:root {
    --bg-void: #05070b;
    --bg-surface: rgba(14, 19, 30, 0.7);
    --bg-surface-elevated: rgba(22, 30, 48, 0.85);
    --gold-primary: #e5b958;
    --gold-light: #f7e096;
    --gold-dark: #a17822;
    --gold-gradient: linear-gradient(135deg, #f7e096 0%, #e5b958 50%, #a17822 100%);
    --blue-accent: #00d2ff;
    --text-pure: #ffffff;
    --text-dim: #94a3b8;
    --border-glass: rgba(229, 185, 88, 0.18);
    --border-glass-subtle: rgba(255, 255, 255, 0.06);
    --glass-blur: blur(20px);
    --radius-lg: 20px;
    --radius-md: 12px;
    --font-en: 'Plus Jakarta Sans', sans-serif;
    --font-fa: 'Vazirmatn', sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: var(--font-en);
    -webkit-font-smoothing: antialiased;
}

[dir="rtl"] * {
    font-family: var(--font-fa);
}

body {
    background-color: var(--bg-void);
    color: var(--text-pure);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* Splash Screen - Full screen background image with animation */
.splash-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #05070b;
    overflow: hidden;
    animation: splash-fade-out 1s ease 4s forwards;
}

.splash-image {
    width: 100vw;
    height: 100vh;
    object-fit: cover;
    object-position: center;
}

@keyframes splash-fade-out {
    0% { opacity: 1; visibility: visible; }
    100% { opacity: 0; visibility: hidden; }
}

/* پسن‌زمینه ذره‌ای تعاملی */
#bg-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 0;
    pointer-events: none;
}

/* هدر شیشه‌ای لوکس */
header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(7, 9, 14, 0.75);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-bottom: 1px solid var(--border-glass-subtle);
    padding: 1.1rem 3rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.brand-container {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    cursor: pointer;
}

.brand-emblem {
    width: 48px;
    height: 48px;
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-glass);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    box-shadow: 0 0 25px rgba(229, 185, 88, 0.35);
    padding: 4px;
}

.brand-emblem img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 6px;
}

.brand-text h1 {
    font-size: 1.4rem;
    font-weight: 800;
    letter-spacing: 2px;
    background: var(--gold-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.brand-text span {
    font-size: 0.65rem;
    letter-spacing: 1px;
    color: var(--text-dim);
    display: block;
    text-transform: uppercase;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.main-nav a {
    color: var(--text-dim);
    text-decoration: none;
    padding: 0.55rem 0.95rem;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    font-weight: 600;
    transition: 0.25s ease;
    white-space: nowrap;
}

.main-nav a:hover,
.main-nav a.active {
    color: var(--gold-light);
    background: rgba(229, 185, 88, 0.1);
    border: 1px solid var(--border-glass);
}

/* Instagram-style bottom navigation (mobile only) */
.bottom-nav {
    display: none;
}

@media (max-width: 1024px) {
    .main-nav { display: none; }

    .bottom-nav {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 500;
        display: flex;
        align-items: stretch;
        background: rgba(7, 9, 14, 0.9);
        backdrop-filter: blur(18px);
        -webkit-backdrop-filter: blur(18px);
        border-top: 1px solid rgba(229, 185, 88, 0.22);
        box-shadow:0 -4px 18px rgba(229, 185, 88, 0.35),
        0 -12px 32px rgba(0, 0, 0, 0.55);
        padding: 0.4rem 0.9rem calc(0.4rem + env(safe-area-inset-bottom, 0px));
    }

    .bnav-item {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 0.28rem;
        padding: 0.4rem 0.3rem;
        color: var(--text-dim);
        text-decoration: none;
        font-size: 0.68rem;
        font-weight: 600;
        letter-spacing: 0.3px;
        border-radius: 12px;
        transition: 0.25s ease;
        -webkit-tap-highlight-color: transparent;
        background: none;
        border: none;
        cursor: pointer;
        font-family: inherit;
    }

    .bnav-item svg {
        width: 24px;
        height: 24px;
        transition: 0.25s ease;
    }

    .bnav-item:hover {
        color: var(--gold-light);
    }

    .bnav-item.active {
        color: var(--gold-light);
        background: rgba(229, 185, 88, 0.14);
        box-shadow: inset 0 0 0 1px rgba(229, 185, 88, 0.35), 0 0 16px rgba(229, 185, 88, 0.28);
    }

    /* Bottom-nav labels stay in the DOM (so i18n + screen readers work)
       but are visually hidden under the icons. */
    .bnav-label {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        margin: -1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
        border: 0;
    }

    /* Special circular badge on the Login icon */
    .bottom-nav #bnav-register svg {
        width: 34px;
        height: 34px;
        padding: 6px;
        border-radius: 50%;
        border: 1.5px solid var(--gold-primary);
        background: rgba(229, 185, 88, 0.12);
        color: var(--gold-light);
        box-shadow: 0 0 14px rgba(229, 185, 88, 0.35);
    }

    body {
        padding-bottom: 64px;
    }
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.lang-dropdown {
    background: var(--bg-surface);
    border: 1px solid var(--border-glass);
    color: var(--text-pure);
    padding: 0.6rem 1.2rem;
    border-radius: var(--radius-md);
    outline: none;
    cursor: pointer;
    backdrop-filter: var(--glass-blur);
    font-size: 0.9rem;
    transition: 0.3s ease;
}

.lang-dropdown:hover {
    border-color: var(--gold-primary);
    box-shadow: 0 0 15px rgba(229, 185, 88, 0.2);
}

/* Account chip + dropdown in the top bar */
.user-menu {
    position: relative;
    display: flex;
    align-items: center;
}

.user-menu.hidden { display: none; }

.user-chip {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    background: var(--bg-surface);
    border: 1px solid var(--border-glass);
    color: var(--text-pure);
    padding: 0.42rem 0.9rem 0.42rem 0.42rem;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.88rem;
    transition: 0.3s ease;
    max-width: 230px;
}

.user-chip:hover {
    border-color: var(--gold-primary);
    box-shadow: 0 0 16px rgba(229, 185, 88, 0.22);
}

.user-avatar {
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    border-radius: 50%;
    background: var(--gold-gradient);
    color: #05070b;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.9rem;
}

.user-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-chip .chev {
    color: var(--text-dim);
    transition: 0.3s ease;
    flex: 0 0 auto;
}

.user-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    min-width: 240px;
    background: rgba(10, 13, 20, 0.96);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border-glass);
    border-radius: 14px;
    padding: 0.5rem;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: 0.25s ease;
    z-index: 400;
}

.user-dropdown.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.user-dropdown .dd-head {
    padding: 0.6rem 0.7rem;
    border-bottom: 1px solid var(--border-glass-subtle);
    margin-bottom: 0.4rem;
}

.user-dropdown .dd-head strong {
    display: block;
    font-size: 0.92rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-dropdown .dd-head span {
    font-size: 0.75rem;
    color: var(--text-dim);
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-dropdown a,
.user-dropdown button {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    width: 100%;
    text-align: left;
    background: transparent;
    border: none;
    color: var(--text-dim);
    padding: 0.65rem 0.7rem;
    border-radius: 9px;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: 0.2s ease;
}

.user-dropdown a:hover,
.user-dropdown button:hover {
    color: var(--gold-light);
    background: rgba(229, 185, 88, 0.08);
}

.user-dropdown svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
    flex: 0 0 auto;
}

[dir="rtl"] .user-dropdown a,
[dir="rtl"] .user-dropdown button {
    text-align: right;
}

/* Toast notifications */
#toast-root {
    position: fixed;
    top: 1.2rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 99999;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    align-items: center;
    pointer-events: none;
}

.toast {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    background: rgba(14, 19, 30, 0.95);
    backdrop-filter: var(--glass-blur);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: var(--text-pure);
    padding: 0.8rem 1.5rem;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 600;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.55);
    white-space: nowrap;
    max-width: 90vw;
    text-overflow: ellipsis;
    overflow: hidden;
    animation: toast-in 0.45s ease, toast-out 0.5s ease 3s forwards;
}

.toast.success {
    border-color: rgba(16, 185, 129, 0.55);
}

.toast.success::before {
    content: '';
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 10px #10b981;
    flex: 0 0 auto;
    animation: toast-pulse 1.4s ease infinite;
}

@keyframes toast-in {
    from { opacity: 0; transform: translateY(-16px) scale(0.96); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes toast-out {
    to { opacity: 0; transform: translateY(-12px); }
}

@keyframes toast-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

@media (max-width: 640px) {
    .user-chip { max-width: 160px; padding-right: 0.7rem; }
    .user-dropdown { right: -40px; min-width: 220px; }
}

.btn-connect {
    background: var(--gold-gradient);
    color: #05070b;
    font-weight: 700;
    padding: 0.65rem 1.6rem;
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
    transition: 0.3s ease;
    box-shadow: 0 4px 20px rgba(229, 185, 88, 0.25);
}

.btn-connect:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 28px rgba(229, 185, 88, 0.45);
}

.btn-ghost {
    background: transparent;
    color: var(--gold-light);
    font-weight: 600;
    padding: 0.65rem 1.4rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-glass);
    cursor: pointer;
    transition: 0.3s ease;
}

.btn-ghost:hover {
    border-color: var(--gold-primary);
    background: rgba(229, 185, 88, 0.08);
    box-shadow: 0 0 15px rgba(229, 185, 88, 0.2);
}

/* محتوای اصلی */
main {
    position: relative;
    z-index: 10;
    max-width: 1300px;
    margin: 0 auto;
    padding: 3rem 2rem;
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 4rem 1rem 3rem;
    position: relative;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 1.2rem;
    background: rgba(229, 185, 88, 0.08);
    border: 1px solid var(--border-glass);
    border-radius: 50px;
    font-size: 0.8rem;
    color: var(--gold-light);
    margin-bottom: 1.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.hero-badge::before {
    content: '';
    width: 8px;
    height: 8px;
    background: var(--gold-primary);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--gold-primary);
}

.hero h2 {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 1.5rem;
    background: linear-gradient(180deg, #ffffff 30%, #a1aab7 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero h2 .highlight {
    background: var(--gold-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero p {
    font-size: 0.9rem;
    color: var(--text-dim);
    max-width: 780px;
    margin: 0 auto 2.5rem;
    line-height: 1.7;
}

.hero p1 {
    font-size: 1.2rem;
    color: var(--text-dim);
    max-width: 780px;
    margin: 0 auto 2.5rem;
    line-height: 1.7;
}

.hero #i18n-hero-desc1 {
    color: #ffffff;
    font-size: 1.4rem;
    font-weight: 600;
    max-width: 800px;
    margin: 0 auto 2.5rem;
    line-height: 1.7;
}

/* بنر تمام‌عرض برند (GADA.png) */
.brand-banner {
    max-width: 1300px;
    margin: 0 auto 2rem;
    padding: 0 2rem;
}
/* az in 2ta nist pas */

.brand-banner img {
    display: block;
    width: 100%;
    height: auto;
    max-height: 55vh;
    object-fit: cover;
    object-position: center;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-glass-subtle);
}

/* گرید کارت‌های داشبورد و شاخص‌ها */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 2rem;
    margin-top: 2rem;
}

/* قاب طلایی درصد بازده سالانه بالای ماشین‌حساب */
.return-frame-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin: 0 auto 2.2rem;
    font-family: var(--font-en);
}

.return-frame {
    display: inline-block;
    padding: 0.7rem 2rem;
    border: 2px solid var(--gold-primary);
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(229, 185, 88, 0.16), rgba(229, 185, 88, 0.05));
    box-shadow: 0 0 24px rgba(229, 185, 88, 0.35), inset 0 0 18px rgba(229, 185, 88, 0.1);
}

.return-frame span {
    font-size: 1.7rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    background: var(--gold-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.return-frame-sub {
    margin-top: 0.6rem;
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--gold-light);
}



/* Extra small phones (<= 480px) */

.glass-panel {
    background: var(--bg-surface);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border-glass-subtle);
    border-radius: var(--radius-lg);
    padding: 2.2rem;
    position: relative;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0,0,0,0.5);
    transition: 0.3s ease;
}

.glass-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--gold-primary), transparent);
    opacity: 0.5;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    gap: 1rem;
    flex-wrap: wrap;
}

.panel-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-pure);
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.panel-title i {
    width: 10px;
    height: 10px;
    background: var(--blue-accent);
    border-radius: 2px;
    display: inline-block;
}

/* ماشین حساب داینامیک */
.calc-group {
    margin-bottom: 1.8rem;
}

.calc-label {
    display: flex;
    justify-content: space-between;
    font-size: 0.95rem;
    color: var(--text-dim);
    margin-bottom: 0.8rem;
}

.calc-slider {
    width: 100%;
    height: 6px;
    background: #1e293b;
    outline: none;
    border-radius: 4px;
    -webkit-appearance: none;
    cursor: pointer;
}

.calc-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--gold-primary);
    box-shadow: 0 0 12px var(--gold-primary);
    cursor: pointer;
}

.calc-output-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.2rem;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-glass-subtle);
}

.calc-stat-box {
    background: rgba(255, 255, 255, 0.02);
    padding: 1.2rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-glass-subtle);
}

.calc-stat-box .title {
    font-size: 0.85rem;
    color: var(--text-dim);
    margin-bottom: 0.4rem;
}

.calc-stat-box .value {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--gold-primary);
}

/* چارت تخصیص دارایی */
.chart-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    padding: 1rem 0;
}

.chart-legend {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.legend-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    padding: 0.6rem 0.8rem;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 8px;
}

.legend-bullet {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 0.5rem;
}

[dir="rtl"] .legend-bullet {
    margin-right: 0;
    margin-left: 0.5rem;
}

/* شاخص‌های کلیدی (KPI) — دایره‌های آماری */
.kpi-section {
    margin-top: 2rem;
    text-align: center;
    padding: 2.6rem 2rem;
}

.kpi-row {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: clamp(1.5rem, 4vw, 3.5rem);
    flex-wrap: wrap;
}

.kpi-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    min-width: 0;
}

.kpi-circle {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, rgba(229, 185, 88, 0.14), rgba(14, 19, 30, 0.6) 70%);
    border: 1px solid var(--border-glass);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 1.2rem;
    box-shadow: 0 0 40px rgba(229, 185, 88, 0.18), inset 0 0 28px rgba(229, 185, 88, 0.06);
    transition: 0.3s ease;
}

.kpi-item:hover .kpi-circle {
    border-color: var(--gold-primary);
    box-shadow: 0 0 55px rgba(229, 185, 88, 0.35), inset 0 0 28px rgba(229, 185, 88, 0.1);
    transform: translateY(-3px);
}

.kpi-value {
    font-size: 0.9rem;
    font-weight: 800;
    color: var(--gold-light);
    text-align: center;
    line-height: 1.25;
    word-break: break-word;
}

.kpi-label {
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--text-dim);
    text-align: center;
    max-width: 180px;
    line-height: 1.4;
}

.kpi-limit-title {
    margin-top: 2.4rem;
    font-size: 1.6rem;
    font-weight: 800;
    letter-spacing: 1px;
    background: var(--gold-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.kpi-limit-sub {
    margin-top: 0.6rem;
    font-size: 0.95rem;
    color: var(--text-dim);
    line-height: 1.7;
    max-width: 720px;
    margin-left: auto;
    margin-right: auto;
}

/* بخش ارتقاء بازده پس از یکسال همکاری */
.promo-panel {
    margin-top: 2rem;
    text-align: center;
    padding: 2.6rem 2.4rem;
    background: linear-gradient(135deg, rgba(229, 185, 88, 0.08) 0%, rgba(14, 19, 30, 0.6) 50%);
}

.promo-head {
    font-size: clamp(1.25rem, 2.4vw, 1.7rem);
    font-weight: 700;
    color: var(--text-pure);
    line-height: 1.55;
    max-width: 900px;
    margin: 0 auto;
}

.promo-sub {
    margin-top: 1rem;
    font-size: 0.95rem;
    color: var(--text-dim);
    line-height: 1.7;
    max-width: 820px;
    margin-left: auto;
    margin-right: auto;
}

/* Page intro (shared by inner pages) */
.page-head {
    text-align: center;
    padding: 2.5rem 1rem 2rem;
}

.page-head h2 {
    font-size: 2.6rem;
    font-weight: 800;
    margin-bottom: 0.8rem;
    background: var(--gold-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.page-head p {
    font-size: 1.05rem;
    color: var(--text-dim);
    max-width: 720px;
    margin: 0 auto;
    line-height: 1.7;
}

/* Rules page */
.rules-panel {
    max-width: 860px;
    margin: 0 auto 1.6rem;
    padding: 1.4rem 2rem;
}

.rules-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
    margin: 0;
    padding: 0;
}

.rule-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem 1.2rem;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-glass-subtle);
    transition: 0.25s ease;
}

.rule-item:hover {
    border-color: rgba(229, 185, 88, 0.35);
    background: rgba(229, 185, 88, 0.05);
    box-shadow: 0 0 16px rgba(229, 185, 88, 0.12);
}

.rule-num {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--gold-gradient);
    color: #05070b;
    font-size: 0.9rem;
    font-weight: 800;
}

.rule-item p {
    margin: 0;
    color: var(--text-pure);
    font-size: 0.98rem;
    line-height: 1.7;
}

.rules-acceptance {
    max-width: 860px;
    margin: 0 auto;
    padding: 1.4rem 2rem;
    text-align: center;
}

.rules-acceptance p {
    margin: 0 0 1.2rem;
    color: var(--text-dim);
    font-size: 0.95rem;
    line-height: 1.7;
}

.rules-cta {
    display: inline-block;
    text-decoration: none;
    font-size: 0.95rem;
}

/* Registration form */
.form-panel {
    max-width: 720px;
    margin: 0 auto;
}

/* Compact auth forms on larger screens */

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.2rem;
}

.form-field {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-field label {
    font-size: 0.85rem;
    color: var(--text-dim);
}

.form-field input,
.form-field select {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-glass-subtle);
    color: var(--text-pure);
    padding: 0.8rem 1rem;
    border-radius: var(--radius-md);
    outline: none;
    font-size: 0.95rem;
    transition: 0.3s ease;
    width: 100%;
}

.form-field select option {
    background: #0e131e;
    color: var(--text-pure);
}

.form-field input:focus,
.form-field select:focus {
    border-color: var(--gold-primary);
    box-shadow: 0 0 12px rgba(229, 185, 88, 0.15);
}

.checkbox-row {
    display: flex;
    align-items: flex-start;
    gap: 0.7rem;
    font-size: 0.85rem;
    color: var(--text-dim);
    margin: 1rem 0 1.6rem;
}

.checkbox-row input {
    accent-color: var(--gold-primary);
    margin-top: 2px;
}

/* Security code (CAPTCHA) for registration */
.captcha-row {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.captcha-code {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 52px;
    background:
        repeating-linear-gradient(45deg, rgba(229, 185, 88, 0.06) 0 10px, transparent 10px 20px),
        rgba(255, 255, 255, 0.03);
    border: 1px dashed rgba(229, 185, 88, 0.4);
    border-radius: var(--radius-md);
    user-select: none;
    -webkit-user-select: none;
}

.captcha-code span {
    font-family: 'Courier New', monospace;
    font-size: 1.7rem;
    font-weight: 700;
    letter-spacing: 0.6em;
    padding-left: 0.6em;
    color: var(--gold-light);
    text-shadow: 0 0 14px rgba(229, 185, 88, 0.35);
}

.captcha-refresh {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-glass-subtle);
    color: var(--text-dim);
    border-radius: var(--radius-md);
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.75rem 1rem;
    cursor: pointer;
    white-space: nowrap;
    transition: 0.3s ease;
}

.captcha-refresh:hover {
    color: var(--gold-primary);
    border-color: var(--gold-primary);
}

/* Auth tabs and validation */
.auth-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-glass-subtle);
    padding-bottom: 0.5rem;
}

.auth-tab {
    background: transparent;
    border: none;
    color: var(--text-dim);
    font-size: 0.95rem;
    font-weight: 600;
    padding: 0.7rem 1.5rem;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: 0.3s ease;
}

.auth-tab:hover {
    color: var(--gold-light);
    background: rgba(229, 185, 88, 0.08);
}

.auth-tab.active {
    color: var(--gold-light);
    background: rgba(229, 185, 88, 0.12);
    border: 1px solid var(--border-glass);
}

.auth-form {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.field-error {
    display: none;
    color: #ef4444;
    font-size: 0.78rem;
    margin-top: 0.3rem;
}

.field-error:not(:empty) {
    display: block;
}

input.invalid, select.invalid {
    border-color: #ef4444 !important;
    box-shadow: 0 0 12px rgba(239, 68, 68, 0.15) !important;
}

.auth-switch button:hover {
    text-decoration: underline;
}

.form-success {
    text-align: center;
    padding: 2rem 1rem;
}

.form-success h3 {
    font-size: 1.8rem;
    background: var(--gold-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.8rem;
}

.form-success p {
    color: var(--text-dim);
    line-height: 1.7;
}

.form-success .ref-id {
    display: inline-block;
    margin-top: 1rem;
    padding: 0.6rem 1.4rem;
    background: rgba(229, 185, 88, 0.08);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    color: var(--gold-light);
    font-weight: 700;
    letter-spacing: 1px;
}

/* Wallet page */
.wallet-grid {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 1.5rem;
    margin-top: 1.8rem;
    max-width: 1080px;
    margin-left: auto;
    margin-right: auto;
    align-items: start;
}

.wallet-grid .glass-panel {
    padding: 1.8rem;
}

.wallet-balance .balance-label {
    font-size: 0.85rem;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.wallet-balance .balance-value {
    font-size: 2.5rem;
    font-weight: 800;
    background: linear-gradient(180deg, #ffffff 40%, #a1aab7 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin: 0.4rem 0 1rem;
    min-width: 0;
    overflow-wrap: anywhere;
}

.wallet-address-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-glass-subtle);
    border-radius: var(--radius-md);
    padding: 0.7rem 1rem;
    margin-bottom: 1.4rem;
}

.wallet-address-row code {
    flex: 1;
    font-size: 0.85rem;
    color: var(--gold-light);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    direction: ltr;
    text-align: left;
}

.wallet-address-row button {
    background: var(--gold-gradient);
    color: #05070b;
    border: none;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.8rem;
    padding: 0.5rem 0.9rem;
    cursor: pointer;
}

.network-badges {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.network-badges span {
    font-size: 0.75rem;
    padding: 0.4rem 0.9rem;
    border-radius: 50px;
    border: 1px solid var(--border-glass);
    color: var(--text-dim);
    background: rgba(229, 185, 88, 0.05);
}

.quick-actions {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-top: 1.5rem;
}

.quick-action-btn {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-glass-subtle);
    color: var(--text-pure);
    border-radius: var(--radius-md);
    padding: 1rem 0.6rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: 0.3s ease;
}

.quick-action-btn svg {
    width: 22px;
    height: 22px;
    fill: var(--gold-primary);
}

.quick-action-btn:hover {
    border-color: var(--gold-primary);
    background: rgba(229, 185, 88, 0.08);
    transform: translateY(-2px);
}

/* Network selector (ERC-20 / TRC-20 / BEP-20) */
.network-select {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 1.2rem;
}

.network-btn {
    flex: 1;
    min-width: 90px;
    padding: 0.55rem 0.8rem;
    border-radius: 50px;
    border: 1px solid var(--border-glass);
    background: rgba(229, 185, 88, 0.05);
    color: var(--text-dim);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: 0.3s ease;
}

.network-btn:hover,
.network-btn.active {
    border-color: var(--gold-primary);
    background: var(--gold-gradient);
    color: #05070b;
}

/* Portfolio panel (wallet) */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.portfolio-grid .calc-stat-box .value { font-size: 1.3rem; }

.portfolio-payout {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1.4rem;
    padding: 0.7rem 1rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-glass-subtle);
    background: rgba(255, 255, 255, 0.02);
    font-size: 0.85rem;
    color: var(--text-dim);
}

.portfolio-payout strong { color: var(--gold-light); font-size: 0.95rem; }

.portfolio-note {
    display: none;
    margin-top: 1.4rem;
    padding: 1rem 1.1rem;
    border-radius: var(--radius-md);
    border: 1px dashed var(--border-glass);
    background: rgba(229, 185, 88, 0.04);
    font-size: 0.85rem;
    color: var(--text-dim);
    line-height: 1.6;
}

.btn-allocation {
    display: inline-block;
    margin-top: 0.9rem;
    padding: 0.6rem 1.2rem;
    border-radius: 10px;
    background: var(--gold-gradient);
    color: #05070b;
    font-weight: 700;
    font-size: 0.85rem;
    text-align: center;
}

.portfolio-alloc {
    margin-top: 1.6rem;
    padding-top: 1.4rem;
    border-top: 1px solid var(--border-glass-subtle);
}

.tx-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

.tx-table th {
    text-align: left;
    color: var(--text-dim);
    font-weight: 600;
    padding: 0.7rem 0.8rem;
    border-bottom: 1px solid var(--border-glass-subtle);
    text-transform: uppercase;
    font-size: 0.72rem;
    letter-spacing: 0.5px;
}

.tx-table td {
    padding: 0.8rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.tx-table .tx-hash {
    color: var(--blue-accent);
    direction: ltr;
    font-size: 0.8rem;
    word-break: break-all;
    overflow-wrap: anywhere;
}

.tx-table .tx-type-in { color: #10b981; }
.tx-table .tx-type-out { color: var(--gold-primary); }
.tx-table .tx-status { color: #10b981; }

.tx-empty {
    text-align: center;
    color: var(--text-dim);
    padding: 1.4rem;
    font-size: 0.9rem;
}

/* Send form (wallet) */
.send-form {
    display: none;
    flex-direction: column;
    gap: 1.2rem;
}

.send-form .form-grid { grid-template-columns: 1fr 1fr; }

.send-actions {
    display: flex;
    gap: 0.8rem;
    flex-wrap: wrap;
}

/* Wallet v2: balance actions, invest/withdraw flows, portfolio, cancel modal */
.wal-balance-hint {
    font-size: 0.82rem;
    color: var(--text-dim);
    line-height: 1.6;
    margin: 0.2rem 0 0;
}

.balance-avail {
    display: flex;
    gap: 0.35rem;
    align-items: center;
    margin-top: 0.5rem;
}

.wallet-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-top: 1.5rem;
}

.wallet-action-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.4rem;
    text-align: left;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-glass-subtle);
    border-radius: var(--radius-md);
    padding: 1.2rem;
    color: var(--text-pure);
    cursor: pointer;
    transition: 0.3s ease;
}

.wallet-action-card strong {
    font-size: 1.05rem;
    font-weight: 700;
    color: #fff;
}

.wallet-action-card > span:last-child {
    font-size: 0.78rem;
    color: var(--text-dim);
    line-height: 1.5;
}

.wallet-action-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(229, 185, 88, 0.12);
    border: 1px solid rgba(229, 185, 88, 0.25);
    margin-bottom: 0.3rem;
}

.wallet-action-icon svg {
    width: 22px;
    height: 22px;
    fill: var(--gold-primary);
}

.wallet-action-card:hover {
    border-color: var(--gold-primary);
    background: rgba(229, 185, 88, 0.08);
    transform: translateY(-2px);
}

/* Invest / withdraw flows */
.wallet-flow[hidden],
.flow-step[hidden],
.modal-overlay[hidden] {
    display: none;
}

.flow-step {
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
}

.flow-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.8rem;
}

.flow-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: #fff;
    margin: 0;
}

.flow-close {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border-glass-subtle);
    color: var(--text-dim);
    width: 30px;
    height: 30px;
    border-radius: 8px;
    font-size: 1.1rem;
    line-height: 1;
    cursor: pointer;
    transition: 0.3s ease;
}

.flow-close:hover {
    color: #fff;
    border-color: var(--gold-primary);
}

.flow-hint {
    font-size: 0.82rem;
    color: var(--text-dim);
    line-height: 1.6;
    margin: 0;
}

.flow-actions {
    display: flex;
    gap: 0.8rem;
    flex-wrap: wrap;
    align-items: center;
    margin-top: 0.4rem;
}

.confirm-check {
    display: flex;
    align-items: flex-start;
    gap: 0.7rem;
    font-size: 0.88rem;
    color: var(--text-soft);
    line-height: 1.55;
    cursor: pointer;
    padding: 0.7rem 0.9rem;
    border: 1px solid var(--border-glass-subtle);
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.02);
}

.confirm-check input {
    margin-top: 0.2rem;
    accent-color: var(--gold-primary);
}

.confirm-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.85rem 1rem;
    background: rgba(229, 185, 88, 0.06);
    border: 1px solid rgba(229, 185, 88, 0.22);
    border-radius: var(--radius-md);
    font-size: 0.85rem;
    color: var(--text-dim);
}

.confirm-row strong {
    color: var(--gold-light);
    font-size: 1rem;
}

/* Payment (QR) step */
.pay-qr-box {
    display: flex;
    justify-content: center;
    padding: 0.6rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
}

.pay-qr-box img {
    border-radius: 10px;
    background: #fff;
}

.pay-label {
    font-size: 0.78rem;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 0.4rem;
}

.pay-address {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-glass-subtle);
    border-radius: var(--radius-md);
    padding: 0.7rem 1rem;
}

.pay-address code {
    flex: 1;
    font-size: 0.85rem;
    color: var(--gold-light);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    direction: ltr;
    text-align: left;
}

.pay-address button {
    background: var(--gold-gradient);
    color: #05070b;
    border: none;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.8rem;
    padding: 0.5rem 0.9rem;
    cursor: pointer;
}

.pay-instant {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    font-size: 0.85rem;
    color: var(--text-dim);
    padding-top: 0.4rem;
}

.pay-instant strong {
    color: #10b981;
    font-size: 1.05rem;
}

.pay-status {
    font-size: 0.9rem;
    font-weight: 600;
    padding: 0.8rem 1rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-glass);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-dim);
}

.pay-status.ok {
    color: #10b981;
    border-color: rgba(16, 185, 129, 0.35);
    background: rgba(16, 185, 129, 0.08);
}

.pay-status.warn {
    color: var(--gold-primary);
    border-color: rgba(229, 185, 88, 0.4);
    background: rgba(229, 185, 88, 0.08);
}

/* Portfolio investments list */
.invest-panel .portfolio-grid {
    margin-bottom: 1.2rem;
}

.invest-empty {
    text-align: center;
    color: var(--text-dim);
    font-size: 0.88rem;
    padding: 1rem 0.5rem;
}

.invest-empty p {
    margin: 0;
    line-height: 1.6;
}

.invest-list {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    border-top: 1px solid var(--border-glass-subtle);
    padding-top: 1.1rem;
}

.invest-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr) auto;
    gap: 0.8rem;
    align-items: center;
    padding: 0.9rem 1rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-glass-subtle);
    border-radius: var(--radius-md);
}

.invest-cell {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    min-width: 0;
}

.invest-cell-lbl {
    font-size: 0.68rem;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.invest-cell strong {
    font-size: 0.92rem;
    color: var(--text-soft);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.invest-cancel {
    background: rgba(248, 113, 113, 0.1);
    border: 1px solid rgba(248, 113, 113, 0.3);
    color: #f87171;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.5rem 0.9rem;
    cursor: pointer;
    white-space: nowrap;
    transition: 0.3s ease;
}

.invest-cancel:hover {
    background: rgba(248, 113, 113, 0.18);
    border-color: #f87171;
}

.tx-table .tx-type-cancel { color: #f87171; }

/* Cancel-investment modal */
.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 400;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.2rem;
    background: rgba(4, 6, 10, 0.72);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.modal-box {
    width: 100%;
    max-width: 420px;
    background: #0d1219;
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-lg);
    padding: 1.6rem;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
}

.modal-box h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: #fff;
    margin: 0 0 0.5rem;
}

.modal-box p {
    font-size: 0.9rem;
    color: var(--text-dim);
    line-height: 1.6;
    margin: 0 0 1.2rem;
}

.modal-actions {
    display: flex;
    gap: 0.8rem;
    justify-content: flex-end;
    flex-wrap: wrap;
}

/* Chat widget */
.chat-fab {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 300;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--gold-gradient);
    border: none;
    cursor: pointer;
    box-shadow: 0 8px 30px rgba(229, 185, 88, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.3s ease;
}

.chat-fab:hover {
    transform: scale(1.06) translateY(-2px);
    box-shadow: 0 10px 40px rgba(229, 185, 88, 0.6);
}

.chat-fab svg {
    width: 28px;
    height: 28px;
    fill: #05070b;
}

.chat-fab .badge-dot {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #10b981;
    border: 2px solid #05070b;
}

.chat-panel {
    position: fixed;
    bottom: 6.2rem;
    right: 1.5rem;
    z-index: 300;
    width: 360px;
    max-width: calc(100vw - 2rem);
    height: 460px;
    background: rgba(10, 13, 20, 0.94);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid rgba(229, 185, 88, 0.55);
    border-radius: 18px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow:
        0 30px 70px rgba(0, 0, 0, 0.7),
        0 0 18px rgba(229, 185, 88, 0.5),
        0 0 55px rgba(229, 185, 88, 0.22);
    transition: 0.3s ease;
    transform-origin: bottom right;
}

.chat-panel.closed {
    opacity: 0;
    transform: scale(0.9) translateY(20px);
    pointer-events: none;
}

.chat-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.8rem;
    padding: 1rem 1.2rem;
    background: rgba(229, 185, 88, 0.08);
    border-bottom: 1px solid var(--border-glass-subtle);
}

.chat-head .chat-title {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-weight: 700;
    font-size: 0.95rem;
}

.chat-head .chat-title img {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    object-fit: contain;
    background: var(--bg-surface-elevated);
    padding: 3px;
    border: 1px solid var(--border-glass);
}

.chat-head .chat-status {
    font-size: 0.7rem;
    color: #10b981;
}

.chat-close {
    background: transparent;
    border: none;
    color: var(--text-dim);
    font-size: 1.5rem;
    cursor: pointer;
    line-height: 1;
}

.chat-body {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.chat-msg {
    max-width: 82%;
    padding: 0.65rem 0.95rem;
    border-radius: 12px;
    font-size: 0.88rem;
    line-height: 1.55;
    animation: chat-in 0.25s ease;
}

@keyframes chat-in {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.chat-msg.bot {
    background: rgba(229, 185, 88, 0.08);
    border: 1px solid rgba(229, 185, 88, 0.15);
    align-self: flex-start;
    border-bottom-left-radius: 4px;
    color: var(--text-pure);
}

.chat-msg.user {
    background: var(--gold-gradient);
    color: #05070b;
    font-weight: 600;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}

.chat-input-row {
    display: flex;
    gap: 0.6rem;
    padding: 0.9rem;
    border-top: 1px solid var(--border-glass-subtle);
}

.chat-input-row input {
    flex: 1;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-glass-subtle);
    color: var(--text-pure);
    border-radius: var(--radius-md);
    padding: 0.7rem 1rem;
    outline: none;
    font-size: 0.9rem;
}

.chat-input-row input:focus {
    border-color: var(--gold-primary);
}

.chat-input-row button {
    background: var(--gold-gradient);
    border: none;
    color: #05070b;
    font-weight: 700;
    border-radius: var(--radius-md);
    padding: 0 1.2rem;
    cursor: pointer;
    transition: 0.3s ease;
}

.chat-input-row button:hover {
    box-shadow: 0 0 14px rgba(229, 185, 88, 0.5);
}

[dir="rtl"] .chat-fab,
[dir="rtl"] .chat-panel {
    right: auto;
    left: 1.5rem;
}

[dir="rtl"] .chat-tx-set { direction: rtl; }

/* فوتر حقوقی و وضعیت قرارداد */
footer {
    position: relative;
    z-index: 10;
    margin-top: 5rem;
    padding: 3rem 2rem;
    background: #030407;
    border-top: 1px solid var(--border-glass-subtle);
    text-align: center;
}

.footer-compliance {
    max-width: 900px;
    margin: 0 auto;
    font-size: 0.8rem;
    color: #526173;
    line-height: 1.8;
}

.footer-contact-row {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 0.5rem;
}

.footer-contact {
    color: #526173;
    text-decoration: none;
    margin: 0 0.7rem;
    transition: color 0.2s ease;
    direction: ltr;
    text-align: center;
    unicode-bidi: isolate;
}

.footer-contact:hover {
    color: #ffffff;
    text-decoration: underline;
}

.security-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    color: var(--gold-primary);
    font-size: 0.85rem;
    margin-bottom: 1.2rem;
}
@media (max-width: 1024px) {
    .dashboard-grid { grid-template-columns: 1fr; }
    .hero h2 { font-size: 2.3rem; }
    header { padding: 1rem 1.5rem; }
    .wallet-grid { grid-template-columns: 1fr; }
    .form-grid { grid-template-columns: 1fr; }
    .chat-fab { display: none; }
}
@media (max-width: 640px) {
    header { padding: 0.7rem 0.9rem; gap: 0.5rem; flex-wrap: nowrap; }
    .brand-container { min-width: 0; gap: 0.6rem; }
    .brand-emblem { width: 38px; height: 38px; }
    .brand-text { min-width: 0; }
    .brand-text h1 { font-size: 1.05rem; letter-spacing: 0.8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .brand-text span { font-size: 0.5rem; letter-spacing: 0.4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .lang-dropdown { padding: 0.45rem 0.65rem; font-size: 0.78rem; }
    .btn-connect { padding: 0.5rem 1rem; font-size: 0.82rem; white-space: nowrap; }
    .nav-actions { gap: 0.5rem; flex-wrap: nowrap; flex-shrink: 0; }
    .user-chip { max-width: 140px; padding-right: 0.7rem; }

    main { padding: 1.5rem 1rem; }
    .hero { padding: 2.4rem 0.25rem 1.8rem; }
    .hero h2 { font-size: 1.85rem; line-height: 1.2; }
    .hero p { font-size: 0.98rem; margin-bottom: 1.4rem; }
    .hero #i18n-hero-desc1 { font-size: 1.05rem; margin-bottom: 1.4rem; }
    .hero-badge { font-size: 0.72rem; padding: 0.35rem 1rem; }
    .return-frame span { font-size: 1.35rem; }
    .return-frame { padding: 0.55rem 1.4rem; }

    .brand-banner { padding: 0 1rem; margin-bottom: 1.4rem; }
    .brand-banner img { max-height: 30vh; }
    .portfolio-grid { grid-template-columns: 1fr; }

    .glass-panel { padding: 1.4rem; }
    .panel-header { margin-bottom: 1.4rem; }
    .panel-title { font-size: 1.02rem; }
    .calc-label { flex-wrap: wrap; gap: 0.3rem; }
    .calc-output-grid { grid-template-columns: 1fr; gap: 0.9rem; }
    .calc-stat-box .value { font-size: 1.35rem; }
    .calc-stat-box { padding: 1rem; }

    .form-panel { padding: 1.4rem; }
    .form-grid { grid-template-columns: 1fr; }
    .auth-form .form-grid,
    .send-form .form-grid { grid-template-columns: 1fr !important; }
    .auth-tab { padding: 0.55rem 0.9rem; font-size: 0.88rem; }
    .auth-tabs { gap: 0.4rem; }
    .form-field input,
    .form-field select { padding: 0.72rem 0.9rem; }

    .page-head { padding: 1.5rem 0.5rem 1rem; }
    .page-head h2 { font-size: 1.85rem; }
    .page-head p { font-size: 0.95rem; }

    /* Rules page on mobile */
    .rules-panel { padding: 1.1rem 1rem; }
    .rule-item { padding: 0.85rem 0.9rem; gap: 0.8rem; }
    .rule-num { width: 26px; height: 26px; font-size: 0.8rem; }
    .rules-acceptance { padding: 1.2rem 1rem; }
    .rules-cta { font-size: 0.9rem; }

    .wallet-grid { gap: 1.2rem; margin-top: 1.2rem; }
    .wallet-grid .glass-panel { padding: 1.25rem; }
    .wallet-balance .balance-value { font-size: 1.85rem; }
    .wallet-balance .balance-label { font-size: 0.75rem; }
    .wallet-address-row {
        flex-direction: column;
        align-items: stretch;
        padding: 0.8rem;
    }
    .wallet-address-row code {
        font-size: 0.75rem;
        white-space: normal;
        word-break: break-all;
        overflow-wrap: anywhere;
        text-align: center;
    }
    .wallet-address-row button { align-self: center; }
    .quick-actions { gap: 0.6rem; }
    .quick-action-btn { padding: 0.8rem 0.3rem; font-size: 0.72rem; }
    .wallet-actions { grid-template-columns: 1fr; }
    .wallet-action-card { padding: 1rem; }
    .wallet-action-card > span:last-child { font-size: 0.75rem; }
    .invest-row { grid-template-columns: repeat(2, 1fr); }
    .invest-cancel { grid-column: 1 / -1; justify-self: start; }
    .pay-address { flex-direction: column; align-items: stretch; }
    .pay-address code { text-align: center; white-space: normal; word-break: break-all; }

    /* Transaction history becomes stacked cards on mobile, nothing is cut off */
    .tx-table, .tx-table thead, .tx-table tbody, .tx-table tr, .tx-table td { display: block; }
    .tx-table thead { display: none; }
    .tx-table tr {
        padding: 0.7rem 0 0.85rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    }
    .tx-table tr:last-child { border-bottom: none; }
    .tx-table tbody td { padding: 0.2rem 0; border: none; }
    .tx-table td[data-col]::before {
        content: attr(data-col);
        display: block;
        font-size: 0.6rem;
        color: var(--text-dim);
        text-transform: uppercase;
        letter-spacing: 0.5px;
        margin-bottom: 0.1rem;
    }
    .tx-table tbody .tx-hash { word-break: break-all; font-size: 0.75rem; }
    .tx-table .tx-empty { padding: 1rem 0; }

    footer { padding: 2rem 1.2rem; }
    .chat-panel { bottom: calc(9.2rem + env(safe-area-inset-bottom, 0px)); height: min(460px, 60vh); }
    [dir="rtl"] .chat-panel { right: auto; left: 1.1rem; }
}
@media (max-width: 480px) {
    .hero h2 { font-size: 1.6rem; line-height: 1.25; }
    .hero p { font-size: 0.9rem; }
    .hero #i18n-hero-desc1 { font-size: 0.95rem; }
    .hero-badge { font-size: 0.68rem; padding: 0.3rem 0.9rem; }
    .glass-panel { padding: 1.2rem; }
    .calc-stat-box .value { font-size: 1.2rem; }
    .calc-stat-box { padding: 0.85rem; }
    .panel-title { font-size: 0.95rem; }
    .wallet-balance .balance-value { font-size: 1.6rem; }
    .wallet-address-row code { font-size: 0.7rem; }
    .quick-actions { grid-template-columns: repeat(2, 1fr); }
    .quick-action-btn { padding: 0.7rem 0.25rem; font-size: 0.68rem; }
    .send-form .form-grid { gap: 0.8rem; }
    .send-form .form-field input,
    .send-form .form-field select { padding: 0.65rem 0.85rem; }
}
@media (min-width: 961px) {
    .form-panel {
        max-width: 580px;
        padding: 1.9rem 2.2rem;
    }
    .page-head {
        padding: 1.8rem 1rem 1.3rem;
    }
    .page-head h2 {
        font-size: 2.1rem;
        margin-bottom: 0.6rem;
    }
    .page-head p {
        font-size: 0.95rem;
    }
    .auth-tabs {
        margin-bottom: 1.2rem;
    }
    .auth-tab {
        padding: 0.55rem 1.2rem;
        font-size: 0.9rem;
    }
    .form-grid {
        gap: 0.95rem;
    }
    .form-field {
        gap: 0.4rem;
    }
    .form-field label {
        font-size: 0.8rem;
    }
    .form-field input,
    .form-field select {
        padding: 0.6rem 0.9rem;
        font-size: 0.9rem;
        border-radius: 10px;
    }
    .checkbox-row {
        font-size: 0.8rem;
        margin: 0.8rem 0 1.2rem;
    }
    .auth-form .btn-connect {
        padding: 0.72rem 1rem !important;
    }
}

/* Responsive adjustments for KPI + promo sections */
@media (max-width: 640px) {
    .kpi-section { padding: 2rem 1.2rem; }
    .kpi-row { gap: 2rem; flex-direction: column;  align-items: center;}
    .kpi-circle { width: 130px; height: 130px; padding: 0 0.9rem; }
    .kpi-value { font-size: 0.9rem; }
    .kpi-label { font-size: 0.7rem; letter-spacing: 0.5px; max-width: 180px; }
    .kpi-limit-title { font-size: 1.35rem; }
    .kpi-limit-sub { font-size: 0.85rem; }
    .promo-panel { padding: 2rem 1.4rem; }
    .promo-head { font-size: 1.18rem; }
    .promo-sub { font-size: 0.88rem; }
}

@media (max-width: 400px) {
    header { padding: 0.6rem 0.75rem; gap: 0.4rem; }
    .brand-emblem { width: 34px; height: 34px; }
    .brand-text h1 { font-size: 0.95rem; letter-spacing: 0.6px; }
    .brand-text span { display: none; }
    .lang-dropdown { padding: 0.4rem 0.55rem; font-size: 0.75rem; max-width: 84px; }
    .btn-connect { padding: 0.48rem 0.85rem; font-size: 0.78rem; }
    .user-chip { max-width: 44px; padding: 0.3rem; justify-content: center; }
    .user-chip .user-name,
    .user-chip .chev { display: none; }
    .kpi-row { gap: 1.6rem; }
    .kpi-circle { width: 118px; height: 118px; padding: 0 0.8rem; }
    .kpi-value { font-size: 1rem; }
    .kpi-label { font-size: 0.66rem; max-width: 165px; }
    .kpi-limit-title { font-size: 1.2rem; }
}
