/**
 * P2P Money Global - Centralized Design Tokens & Theme System
 * Single Source of Truth for Colors, Gradients, Borders, and Glows
 * Edit this file to change the entire system theme instantly!
 */

:root {
    /* ============================================================
       0. RESPONSIVE CONTAINER SYSTEM (รองรับมือถือและแท็บเล็ต)
       ============================================================ */
    --app-max-width: 480px;

    /* ============================================================
       1. BACKGROUND PALETTE (สีพื้นหลัง)
       ============================================================ */
    --bg-page: #060709;                   /* พื้นหลังนอกสุดของหน้าจอ */
    --bg-main: #0c0d11;                   /* พื้นหลังตัวแอพหลัก */
    --bg-card: #15171e;                   /* พื้นหลังการ์ดหลัก */
    --bg-card-inner: #0f1015;             /* พื้นหลังกล่องย่อยในการ์ด */
    --bg-input: #0f1015;                  /* พื้นหลังช่อง Input */
    --bg-pill: #0f1015;                   /* พื้นหลังป้ายเลือก Network */

    /* ============================================================
       2. THEME ACCENT PALETTE (โทนสีหลัก - ปัจจุบัน: Luxury Gold)
       ============================================================ */
    --theme-primary: #dfb35f;             /* สีทองหลัก */
    --theme-light: #fae4a8;               /* สีทองสว่าง */
    --theme-pale: #f7dda2;                /* สีทองครีม */
    --theme-dark: #b8862d;                /* สีทองเข้ม */
    --theme-muted: #9c8f78;               /* สีทองหม่น/เทา */
    --theme-dim: #6b6355;                 /* สีทองเข้มสำหรับเส้นประ */

    /* ============================================================
       3. BORDERS & LINES (เส้นขอบและการแบ่งสัดส่วน)
       ============================================================ */
    --border-theme: 1px solid rgba(222, 185, 120, 0.35);         /* เส้นขอบการ์ดหลัก */
    --border-theme-subtle: 1px solid rgba(222, 185, 120, 0.18);  /* เส้นขอบกล่องย่อย */
    --border-theme-dashed: 1px dashed rgba(222, 185, 120, 0.15); /* เส้นประ */

    /* ============================================================
       4. GRADIENTS & GLOWS (การไล่เฉดสีและแสงเรือง)
       ============================================================ */
    --theme-gradient: linear-gradient(180deg, #fce5a9 0%, #dfb35f 50%, #ba8a38 100%);
    --theme-gradient-avatar: linear-gradient(135deg, #fae4a8 0%, #d8aa53 50%, #996e1b 100%);
    --theme-glow: 0 0 22px rgba(223, 179, 95, 0.45);
    --theme-glow-soft: 0 0 14px rgba(223, 179, 95, 0.3);
    --theme-glow-strong: 0 0 28px rgba(223, 179, 95, 0.6);

    /* ============================================================
       5. TYPOGRAPHY & TEXT COLORS (สีตัวหนังสือ)
       ============================================================ */
    --text-primary: #ffffff;
    --text-secondary: #94a3b8;
    --text-theme-bright: #fae4a8;
    --text-theme-light: #f3dfb7;
    --text-theme-muted: #9c8f78;
    --text-dark-btn: #110d02;             /* สีตัวหนังสือบนปุ่มทอง */

    /* ============================================================
       6. BUTTON STYLES (สไตล์ปุ่ม)
       ============================================================ */
    --btn-primary-bg: var(--theme-gradient);
    --btn-primary-text: var(--text-dark-btn);
    --btn-primary-glow: var(--theme-glow);

    --btn-secondary-bg: var(--bg-card);
    --btn-secondary-border: var(--border-theme);
    --btn-secondary-text: var(--theme-primary);

    /* ============================================================
       7. TAB BAR & FLOATING ELEMENTS (เมนูล่างและปุ่มลอย)
       ============================================================ */
    --tab-bg: #0c0d11;
    --tab-border: 1px solid rgba(222, 185, 120, 0.18);
    --tab-active: var(--theme-primary);
    --tab-inactive: #5c5950;

    --cs-btn-bg: var(--theme-gradient-avatar);
    --cs-btn-text: #110d02;
    --cs-btn-glow: 0 0 25px rgba(223, 179, 95, 0.55);

    /* ============================================================
       8. MODAL & TOAST NOTIFICATION (ป๊อปอัปและแจ้งเตือน)
       ============================================================ */
    --modal-bg: #15171e;
    --modal-border: var(--border-theme);
    --toast-bg: rgba(21, 23, 30, 0.95);
    --toast-border: var(--border-theme);
    --toast-text: var(--text-theme-bright);

    /* ============================================================
       9. CONVENIENT COMPATIBILITY ALIASES
       ============================================================ */
    --bg-outer: var(--bg-page);
    --border-gold: var(--border-theme);
    --border-gold-subtle: var(--border-theme-subtle);
    --gold-primary: var(--theme-primary);
    --gold-light: var(--theme-light);
    --gold-pale: var(--theme-pale);
    --gold-gradient: var(--theme-gradient);
    --gold-gradient-avatar: var(--theme-gradient-avatar);
    --gold-glow: var(--theme-glow);
    --gold-glow-soft: var(--theme-glow-soft);
    --text-gold-bright: var(--text-theme-bright);
    --text-gold-light: var(--text-theme-light);
    --text-gold-muted: var(--text-theme-muted);
    --text-gold-dim: var(--theme-dim);
}

/* ============================================================
   RESPONSIVE TABLET & DESKTOP BREAKPOINTS
   ============================================================ */
@media (min-width: 600px) {
    :root {
        --app-max-width: 640px;
    }
}

@media (min-width: 768px) {
    :root {
        --app-max-width: 768px;
    }
}

@media (min-width: 820px) {
    :root {
        --app-max-width: 820px;
    }
}

@media (min-width: 1024px) {
    :root {
        --app-max-width: 860px;
    }
}

/* ============================================================
   10. FULLSCREEN MODAL & COMPONENT STYLES
   ============================================================ */
.fullscreen-modal {
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%) translateY(100%);
    width: 100%;
    max-width: var(--app-max-width, 480px);
    height: 100vh;
    height: 100dvh;
    background-color: var(--bg-main);
    z-index: 95;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 16px 20px 40px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 0 60px rgba(0, 0, 0, 0.95);
    transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s ease;
    opacity: 0;
    pointer-events: none;
}

.fullscreen-modal.active {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
    pointer-events: auto;
}

/* Nav Bar inside Fullscreen Modal */
.top-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 48px;
    margin-bottom: 14px;
    position: relative;
}

.nav-back, .nav-action {
    color: #ffffff;
    font-size: 18px;
    text-decoration: none;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 50%;
    transition: all 0.2s;
    background: transparent;
    border: none;
}

.nav-back:active, .nav-action:active {
    background: rgba(222, 185, 120, 0.12);
}

.nav-title {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    font-size: 17px;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: -0.3px;
}

/* Card Deposit */
.card-deposit {
    background: var(--bg-card);
    border-radius: 24px;
    padding: 24px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 24px;
    border: 1px solid var(--border-theme);
}

.network-selector {
    width: 100%;
    background: var(--bg-card-inner);
    border: 1px solid var(--border-theme-subtle);
    color: var(--theme-primary);
    font-size: 14px;
    font-weight: 800;
    padding: 13px;
    border-radius: 12px;
    text-align: center;
    margin-bottom: 24px;
    letter-spacing: 0.5px;
}

.qr-wrapper {
    background: #ffffff;
    padding: 16px;
    border-radius: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    margin-bottom: 22px;
}

.qr-code-img {
    width: 180px;
    height: 180px;
    display: block;
    border-radius: 8px;
}

.section-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--theme-light);
    margin-bottom: 12px;
    text-align: center;
}

.address-box {
    width: 100%;
    background: var(--bg-card-inner);
    border: 1px solid var(--border-theme-subtle);
    border-radius: 14px;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 18px;
}

.address-text {
    font-size: 12px;
    color: #d1c7b7;
    font-family: monospace;
    word-break: break-all;
    line-height: 1.4;
}

.btn-copy-icon {
    color: var(--theme-primary);
    font-size: 17px;
    cursor: pointer;
    padding: 6px;
    transition: transform 0.15s, color 0.15s;
}

.btn-copy-icon:hover {
    color: var(--theme-light);
}

.warning-banner {
    width: 100%;
    background: rgba(222, 185, 120, 0.06);
    border: 1px solid rgba(222, 185, 120, 0.25);
    border-radius: 14px;
    padding: 14px 16px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 20px;
    font-size: 12px;
    line-height: 1.5;
    color: var(--theme-light);
}

.warning-icon {
    font-size: 15px;
    margin-top: 1px;
    flex-shrink: 0;
    color: var(--theme-primary);
}

.btn-save-qr {
    color: var(--theme-primary);
    font-size: 13px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 6px 12px;
    border-radius: 8px;
    transition: opacity 0.2s;
}

.btn-submit-txn {
    width: 100%;
    background: var(--theme-gradient);
    color: var(--text-dark-btn);
    font-size: 15px;
    font-weight: 800;
    padding: 16px;
    border-radius: 16px;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--theme-glow);
    transition: transform 0.15s, box-shadow 0.2s;
}

/* Card Exchange */
.card-exchange {
    background: var(--bg-card);
    border-radius: 24px;
    padding: 22px 20px;
    display: flex;
    flex-direction: column;
    gap: 18px;
    margin-bottom: 22px;
    border: 1px solid var(--border-theme);
}

.field-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.field-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.field-label {
    font-size: 13px;
    color: var(--text-theme-muted);
    font-weight: 500;
}

.field-sublabel {
    font-size: 12px;
    color: var(--text-theme-muted);
}

.network-box {
    width: 100%;
    background: var(--bg-card-inner);
    border: 1px solid var(--border-theme-subtle);
    color: var(--theme-primary);
    font-size: 14px;
    font-weight: 800;
    padding: 13px;
    border-radius: 12px;
    text-align: center;
    letter-spacing: 0.5px;
}

.input-wrapper {
    background: var(--bg-card-inner);
    border: 1px solid var(--border-theme-subtle);
    border-radius: 14px;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    transition: border-color 0.2s;
}

.input-wrapper:focus-within {
    border-color: var(--theme-primary);
}

.input-field {
    background: transparent;
    border: none;
    color: #ffffff;
    font-size: 14px;
    width: 100%;
    outline: none;
    font-family: inherit;
}

.input-field::placeholder {
    color: #555146;
    font-size: 13px;
}

.input-icon-btn {
    color: var(--theme-primary);
    font-size: 16px;
    cursor: pointer;
    padding: 4px;
    transition: transform 0.15s;
}

.amount-unit-box {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #ffffff;
    font-size: 13px;
    font-weight: 600;
}

.btn-max {
    color: var(--theme-primary);
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
    background: transparent;
    border: none;
    padding: 2px 4px;
    transition: opacity 0.2s;
}

.divider-vertical {
    width: 1px;
    height: 14px;
    background: rgba(222, 185, 120, 0.25);
}

.info-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 13px;
}

.info-label {
    color: var(--text-theme-muted);
}

.info-val {
    color: #ffffff;
    font-weight: 600;
}

.val-highlight {
    color: var(--text-theme-bright);
    font-size: 17px;
    font-weight: 800;
}

.code-input-group {
    display: flex;
    gap: 10px;
    align-items: center;
}

.btn-get-code {
    background: var(--theme-gradient);
    color: var(--text-dark-btn);
    border: none;
    border-radius: 12px;
    padding: 13px 18px;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
    white-space: nowrap;
    transition: opacity 0.2s;
}

.btn-confirm-exchange {
    width: 100%;
    background: var(--theme-gradient);
    color: var(--text-dark-btn);
    font-size: 15px;
    font-weight: 800;
    padding: 16px;
    border-radius: 16px;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--theme-glow);
    margin-top: 4px;
    transition: transform 0.15s, box-shadow 0.2s;
}

.footnote-list {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 0 4px;
}

.footnote-item {
    font-size: 12px;
    color: #646056;
    line-height: 1.5;
}

/* ============================================================
   12. MOCKUP MATCH: TOTAL BALANCE CARD & 3D USDT COIN
   ============================================================ */
.card-balance {
    background: radial-gradient(135% 110% at 50% 0%, #1c1e28 0%, #12141a 45%, #090a0e 100%) !important;
    border: 1.5px solid rgba(250, 228, 168, 0.45) !important;
    border-radius: 26px !important;
    padding: 22px 20px 20px !important;
    box-shadow: 
        0 18px 42px rgba(0, 0, 0, 0.85),
        0 0 35px rgba(223, 179, 95, 0.22),
        inset 0 1px 2px rgba(250, 228, 168, 0.55),
        inset 0 -2px 6px rgba(0, 0, 0, 0.7) !important;
    display: flex;
    flex-direction: column;
    gap: 14px;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(12px);
}

/* Luxury specular highlight beam across top border */
.card-balance::before {
    content: '';
    position: absolute;
    top: 0;
    left: 8%;
    right: 8%;
    height: 1.5px;
    background: linear-gradient(90deg, transparent, rgba(250, 228, 168, 0.85), #ffffff, rgba(250, 228, 168, 0.85), transparent);
    pointer-events: none;
    z-index: 1;
}

.balance-top-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
}

.balance-info-left {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.balance-label-group {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.balance-title {
    font-size: 14px;
    font-weight: 500;
    color: #b5a892;
    display: flex;
    align-items: center;
    gap: 6px;
}

.balance-title i {
    cursor: pointer;
    color: #9c8f78;
    font-size: 13px;
    transition: color 0.2s;
}

.balance-title i:hover {
    color: var(--theme-primary);
}

.live-rate-capsule {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: rgba(14, 203, 129, 0.14);
    border: 1px solid rgba(14, 203, 129, 0.35);
    color: #0ecb81;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 20px;
    transition: all 0.2s;
}

.live-rate-capsule.rate-down {
    background: rgba(246, 70, 93, 0.14);
    border-color: rgba(246, 70, 93, 0.35);
    color: #f6465d;
}

.live-dot-pulse {
    font-size: 9px;
    animation: pulse-dot 1.5s infinite;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.3; transform: scale(0.8); }
}

.balance-digits-row {
    display: flex;
    align-items: baseline;
    gap: 8px;
    font-size: 32px;
    font-weight: 800;
    color: #fae4a8;
    line-height: 1.1;
    letter-spacing: -0.5px;
}

.balance-unit-text {
    font-size: 22px;
    font-weight: 800;
    color: #dfb35f;
}

.balance-fiat-text {
    font-size: 14px;
    color: #9c8f78;
    font-weight: 500;
}

/* 3D Gold Tether USDT Coin Badge (Custom User Image) */
.usdt-coin-wrapper {
    width: 54px;
    height: 54px;
    flex-shrink: 0;
    position: relative;
    border-radius: 50%;
    filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.85)) drop-shadow(0 0 22px rgba(223, 179, 95, 0.45));
    cursor: pointer;
    transition: transform 0.3s cubic-bezier(0.25, 1, 0.5, 1), filter 0.3s ease;
}

.usdt-coin-wrapper:hover {
    transform: scale(1.08) translateY(-2px) rotate(6deg);
    filter: drop-shadow(0 12px 24px rgba(0, 0, 0, 0.9)) drop-shadow(0 0 30px rgba(223, 179, 95, 0.7));
}

.usdt-coin-img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    display: block;
}

/* Inner Chart Frame */
.chart-box-frame {
    background: #0c0d12;
    border: 1px solid rgba(222, 185, 120, 0.22);
    border-radius: 16px;
    padding: 8px 12px 6px;
    position: relative;
    display: flex;
    flex-direction: column;
}

.chart-header-bar {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 2px;
    z-index: 2;
}

.timeframe-capsule {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 2px;
    gap: 2px;
}

.tf-pill {
    background: transparent;
    border: none;
    color: #7d7768;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.tf-pill:hover {
    color: #ffffff;
}

.tf-pill.active {
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
    box-shadow: 0 0 10px rgba(250, 228, 168, 0.25);
}

.chart-canvas-wrapper {
    width: 100%;
    height: 98px;
    position: relative;
}

.chart-canvas-wrapper canvas {
    display: block;
    width: 100%;
    height: 100%;
}

/* Sub Metrics Row */
.sub-metrics-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 4px;
    padding: 0 2px;
}

.metric-col {
    font-size: 13px;
    font-weight: 500;
}

.metric-label {
    color: #8a8375;
    font-weight: 600;
    margin-right: 4px;
}

.metric-value {
    color: #ffffff;
    font-weight: 700;
}

/* ============================================================
   13. ULTRA-PREMIUM ACTION BUTTONS (DEPOSIT & WITHDRAW)
   ============================================================ */
.action-buttons-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-top: 2px;
}

.btn-action {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 18px;
    border-radius: 18px;
    font-weight: 800;
    font-size: 15px;
    letter-spacing: 0.3px;
    cursor: pointer;
    text-decoration: none;
    position: relative;
    overflow: hidden;
    transition: all 0.25s cubic-bezier(0.25, 1, 0.5, 1);
    user-select: none;
}

.btn-action:hover {
    transform: translateY(-2px);
}

.btn-action:active {
    transform: translateY(1px) scale(0.97);
}

.btn-action-icon {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    flex-shrink: 0;
    transition: transform 0.25s ease;
}

.btn-action:hover .btn-action-icon {
    transform: scale(1.1);
}

.btn-action-text {
    font-weight: 800;
    letter-spacing: 0.3px;
}

/* Deposit Button: Radiant Ingot Gold with Specular Highlight */
.btn-deposit {
    background: linear-gradient(135deg, #fae4a8 0%, #dfb35f 40%, #c9993b 85%, #b38226 100%) !important;
    color: #0c0d12 !important;
    border: 1px solid rgba(255, 255, 255, 0.45) !important;
    box-shadow: 
        0 10px 24px rgba(223, 179, 95, 0.38),
        0 4px 10px rgba(0, 0, 0, 0.5),
        inset 0 1px 2px rgba(255, 255, 255, 0.8),
        inset 0 -2px 4px rgba(0, 0, 0, 0.25) !important;
}

.btn-deposit .btn-action-icon {
    background: rgba(12, 13, 18, 0.15);
    color: #0c0d12;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.25);
}

.btn-deposit:hover {
    box-shadow: 
        0 14px 30px rgba(223, 179, 95, 0.55),
        0 6px 14px rgba(0, 0, 0, 0.6),
        inset 0 1px 2px rgba(255, 255, 255, 0.95) !important;
}

.btn-deposit::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -60%;
    width: 40%;
    height: 200%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.35), transparent);
    transform: rotate(25deg);
    transition: all 0.75s ease;
}

.btn-deposit:hover::after {
    left: 130%;
}

/* Withdraw Button: Deep Obsidian Glass with Radiant Gold Border */
.btn-withdraw {
    background: radial-gradient(120% 120% at 50% 0%, #1e222d 0%, #12141c 55%, #0b0c10 100%) !important;
    color: #fae4a8 !important;
    border: 1.5px solid rgba(250, 228, 168, 0.45) !important;
    box-shadow: 
        0 10px 24px rgba(0, 0, 0, 0.75),
        0 0 20px rgba(223, 179, 95, 0.12),
        inset 0 1px 2px rgba(250, 228, 168, 0.35),
        inset 0 -1px 3px rgba(0, 0, 0, 0.6) !important;
}

.btn-withdraw .btn-action-icon {
    background: rgba(223, 179, 95, 0.14);
    border: 1px solid rgba(250, 228, 168, 0.35);
    color: #fae4a8;
    box-shadow: 0 0 10px rgba(223, 179, 95, 0.2);
}

.btn-withdraw:hover {
    border-color: rgba(250, 228, 168, 0.85) !important;
    background: radial-gradient(120% 120% at 50% 0%, #252b39 0%, #151822 55%, #0e0f14 100%) !important;
    box-shadow: 
        0 14px 30px rgba(0, 0, 0, 0.85),
        0 0 26px rgba(223, 179, 95, 0.3),
        inset 0 1px 2px rgba(250, 228, 168, 0.6) !important;
}

.btn-withdraw::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -60%;
    width: 40%;
    height: 200%;
    background: linear-gradient(90deg, transparent, rgba(250, 228, 168, 0.2), transparent);
    transform: rotate(25deg);
    transition: all 0.75s ease;
}

.btn-withdraw:hover::after {
    left: 130%;
}

/* ============================================================
   14. BOTTOM TABBAR NAVIGATION & FLOATING CS BUTTON
   ============================================================ */
.tabbar {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: var(--app-max-width, 480px);
    height: 68px;
    background: #0c0d11;
    border-top: 1px solid rgba(222, 185, 120, 0.2);
    display: flex;
    align-items: center;
    justify-content: space-around;
    padding-bottom: env(safe-area-inset-bottom);
    z-index: 90;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.85);
}

.tab-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    color: #6c6659;
    text-decoration: none;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: color 0.2s, transform 0.15s;
    flex: 1;
    min-width: 0;
    width: 20%;
    height: 100%;
    position: relative;
}

.tab-icon-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 24px;
}

.tab-item i {
    font-size: 19px;
    transition: transform 0.2s;
}

.tab-item.active {
    color: #dfb35f;
}

.tab-item.active i {
    color: #fae4a8;
    transform: scale(1.1);
    text-shadow: 0 0 12px rgba(223, 179, 95, 0.6);
}

/* Luxury Glowing Badge on Trades Tab */
.tab-badge {
    position: absolute;
    top: -5px;
    right: -7px;
    min-width: 17px;
    height: 17px;
    padding: 0 4px;
    border-radius: 10px;
    background: linear-gradient(135deg, #f6465d 0%, #d92038 100%);
    color: #ffffff;
    font-size: 10px;
    font-weight: 800;
    font-family: 'Inter', sans-serif;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 10px rgba(246, 70, 93, 0.8), 0 2px 4px rgba(0, 0, 0, 0.6);
    border: 1.5px solid #0c0d11;
    z-index: 3;
    animation: tab-badge-pulse 2.2s infinite ease-in-out;
}

@keyframes tab-badge-pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(246, 70, 93, 0.75);
    }
    60% {
        transform: scale(1.08);
        box-shadow: 0 0 0 6px rgba(246, 70, 93, 0);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(246, 70, 93, 0);
    }
}

.cs-floating-btn {
    display: none !important;
}

@media (min-width: 480px) {
    .cs-floating-btn {
        right: calc(50% - (var(--app-max-width, 480px) / 2) + 20px);
    }
}

.cs-floating-btn:active {
    transform: scale(0.92);
}

/* ============================================================
   CRITICAL ANTI-FOUC RULES (PREVENT UNSTYLED MODAL FLASH)
   ============================================================ */
.modal-overlay:not(.active),
.fullscreen-modal-overlay:not(.active),
.trade-modal-overlay:not(.active),
.dialog-overlay:not(.active) {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

.modal-overlay.active,
.fullscreen-modal-overlay.active,
.trade-modal-overlay.active,
.dialog-overlay.active {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;
}

/* ============================================================
   GLOBAL TABLET RESPONSIVE CONTAINER OVERRIDES
   ============================================================ */
.app-container,
.mobile-container {
    width: 100%;
    max-width: var(--app-max-width, 480px);
}

.modal-sheet-container,
.trade-modal-container {
    width: 100%;
    max-width: var(--app-max-width, 480px);
}

@media (min-width: 768px) {
    .app-container,
    .mobile-container {
        box-shadow: 0 0 80px rgba(0, 0, 0, 0.98), 0 0 40px rgba(222, 185, 120, 0.08);
    }
    .modal-sheet-container,
    .trade-modal-container {
        border-radius: 28px 28px 0 0;
    }
}

