/**
 * CHEESE Wallet - Golden Obsidian Luxury Theme (V2 Visual Parity)
 * Pure Presentation & Layout Styling.
 * ZERO modifications to crypto core, signatures, BIP-44 derivation, or EVM compatibility.
 */

:root {
    --obsidian-bg: #07090e;
    --obsidian-card: rgba(18, 24, 38, 0.94);
    --obsidian-card-hover: rgba(23, 31, 48, 0.98);
    --gold-primary: #f5a623;
    --gold-bright: #ffd700;
    --gold-glow: rgba(245, 166, 35, 0.25);
    --gold-border: rgba(245, 166, 35, 0.28);
    --emerald-accent: #10b981;
    --cyan-accent: #06b6d4;
    --text-primary: #f8fafc;
    --text-muted: #94a3b8;
    --text-dim: #64748b;
}

/* Background & Global Boundary Locking */
html {
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden !important;
    -webkit-text-size-adjust: 100%;
    touch-action: pan-y;
}

body {
    background-color: var(--obsidian-bg) !important;
    background: radial-gradient(circle at 50% 0%, #151d2f 0%, #07090e 70%) !important;
    color: var(--text-primary) !important;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif !important;
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
    max-width: 100vw !important;
    min-height: 100vh;
    min-height: 100dvh;
    overflow-x: hidden !important;
    overscroll-behavior-x: none !important; /* CRITICAL: Prevents horizontal rubber-band swiping */
    touch-action: pan-y !important; /* CRITICAL: Allows vertical scrolling only; blocks sideways wobble */
    position: relative;
    -webkit-font-smoothing: antialiased;
}

/* Hide legacy desktop header & nav */
body > header.header,
body > nav.nav {
    display: none !important;
}

/* Luxury Device Outer Shell */
.wallet-app-wrapper {
    width: 100%;
    max-width: 100vw;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 16px 12px;
    box-sizing: border-box;
    overflow-x: hidden !important;
    touch-action: pan-y;
}

.shell-device-frame {
    width: 100%;
    max-width: 440px;
    height: min(94vh, 880px);
    max-height: 880px;
    background: linear-gradient(155deg, rgba(22, 28, 42, 0.96) 0%, rgba(11, 15, 23, 0.99) 100%);
    border: 1px solid var(--gold-border);
    border-radius: 38px;
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.9), 0 0 45px rgba(245, 166, 35, 0.12), inset 0 1px 0 rgba(255, 215, 0, 0.15);
    padding: 0;
    position: relative;
    box-sizing: border-box;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* Dynamic Island Status Bar (Removed per user directive) */
.shell-status-bar {
    display: none !important;
}

.shell-time {
    font-weight: 700;
    color: #ffffff;
    padding-left: 4px;
}

.shell-dynamic-island {
    width: 82px;
    height: 18px;
    background: rgba(0, 0, 0, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
}

.shell-status-right {
    display: flex;
    align-items: center;
    gap: 5px;
    padding-right: 4px;
    font-size: 10px;
}

.status-bolt {
    color: var(--gold-bright);
}

/* App Header: Account Selector & Network Pill */
.shell-header {
    flex: 0 0 auto;
    width: 100%;
    box-sizing: border-box;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 18px 12px;
    background: rgba(13, 18, 28, 0.96);
    border-bottom: 1px solid rgba(245, 166, 35, 0.2);
    z-index: 10;
}

.shell-header-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.shell-logo-badge {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(245, 166, 35, 0.25) 0%, rgba(10, 14, 24, 0.9) 70%);
    border: 1.5px solid var(--gold-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    box-shadow: 0 0 15px rgba(245, 166, 35, 0.3);
    flex-shrink: 0;
    overflow: hidden;
}

.shell-account-meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.shell-account-row {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(245, 166, 35, 0.28);
    padding: 4px 10px;
    border-radius: 16px;
    transition: all 0.2s ease;
}

.shell-account-row:hover {
    background: rgba(245, 166, 35, 0.15);
    border-color: var(--gold-bright);
}

.shell-addr-preview {
    font-size: 11px;
    font-weight: 700;
    color: #f8fafc;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.shell-account-caret {
    font-size: 12px;
    color: #ffd700;
    margin-left: 2px;
    line-height: 1;
    display: inline-block;
    transition: transform 0.2s;
}

.shell-account-row:hover .shell-account-caret {
    transform: translateY(1.5px);
}

.shell-copy-icon {
    font-size: 11px;
    color: var(--gold-primary);
    transition: transform 0.2s;
}

.shell-account-row:hover .shell-copy-icon {
    transform: scale(1.15);
}

.shell-network-status {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 10px;
    color: var(--emerald-accent);
    font-weight: 600;
}

.shell-pulse-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--emerald-accent);
    box-shadow: 0 0 8px var(--emerald-accent);
    animation: pulseDot 2s infinite ease-in-out;
}

@keyframes pulseDot {
    0%, 100% { transform: scale(0.9); opacity: 0.8; }
    50% { transform: scale(1.2); opacity: 1; }
}

.shell-header-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

.shell-action-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(30, 41, 59, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #cbd5e1;
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.shell-action-btn:hover {
    background: rgba(245, 166, 35, 0.2);
    border-color: var(--gold-primary);
    color: #ffffff;
    transform: scale(1.05);
}

/* Main Content Container inside Shell */
.shell-device-frame .main-content {
    flex: 1 1 0%;
    min-height: 0;
    padding: 16px 18px 24px !important;
    max-width: 100% !important;
    margin: 0 !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    -webkit-overflow-scrolling: touch !important;
    overscroll-behavior-y: contain !important;
    box-sizing: border-box !important;
}

.shell-device-frame .main-content::-webkit-scrollbar {
    width: 4px;
}
.shell-device-frame .main-content::-webkit-scrollbar-thumb {
    background: rgba(245, 166, 35, 0.25);
    border-radius: 4px;
}

/* Screens */
.screen {
    display: none;
}
.screen.active {
    display: block !important;
    animation: fadeInScreen 0.25s ease-out;
}
@keyframes fadeInScreen {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Balance Card: Glowing Golden Obsidian */
.balance-section.balance-card-glow {
    background: linear-gradient(160deg, #1b2334 0%, #0f131d 100%) !important;
    border: 1px solid rgba(245, 166, 35, 0.35) !important;
    border-radius: 26px !important;
    padding: 20px 18px 14px !important;
    margin-bottom: 18px !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 215, 0, 0.15) !important;
    position: relative;
    overflow: hidden;
    text-align: left !important;
    animation: glowPulse 4s infinite ease-in-out;
}

@keyframes glowPulse {
    0%, 100% { box-shadow: 0 0 25px rgba(245, 166, 35, 0.18), inset 0 0 15px rgba(245, 166, 35, 0.05); }
    50% { box-shadow: 0 0 45px rgba(245, 166, 35, 0.35), inset 0 0 25px rgba(245, 166, 35, 0.12); }
}

.balance-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.balance-card-title {
    font-size: 10px;
    font-weight: 800;
    color: var(--text-muted);
    letter-spacing: 0.8px;
    text-transform: uppercase;
}

.balance-card-badge {
    font-size: 10px;
    font-weight: 700;
    background: rgba(16, 185, 129, 0.15);
    color: var(--emerald-accent);
    border: 1px solid rgba(16, 185, 129, 0.35);
    padding: 2px 8px;
    border-radius: 20px;
}

.balance-amount-row {
    margin: 4px 0 2px;
}

.balance-section .balance-usd {
    font-size: 28px !important;
    font-weight: 900 !important;
    color: #ffffff !important;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace !important;
    letter-spacing: -0.5px !important;
    margin: 0 !important;
}

.balance-crypto-sub {
    font-size: 11px;
    color: var(--gold-bright);
    font-weight: 600;
    margin-top: 2px;
    display: flex;
    align-items: center;
    gap: 3px;
}

.balance-crypto-sub .balance-amount {
    font-size: 11px !important;
    font-weight: 700 !important;
    color: var(--gold-bright) !important;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace !important;
    margin: 0 !important;
}

.balance-crypto-sub .balance-label {
    font-size: 11px !important;
    font-weight: 700 !important;
    color: var(--gold-bright) !important;
}

/* Sparkline SVG */
.balance-sparkline-box {
    margin-top: 10px;
    padding-top: 4px;
}

.balance-sparkline-svg {
    width: 100%;
    height: 52px;
    display: block;
}

/* Quick Action Pills (4-Column Grid) */
.quick-action-pills-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-bottom: 14px;
}

.action-pill-btn {
    background: #141a27;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 18px;
    padding: 10px 4px 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.22s ease;
    position: relative;
    outline: none;
    text-decoration: none;
}

.action-pill-btn:hover {
    background: #192132;
    border-color: rgba(245, 166, 35, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}

.action-pill-btn:active {
    transform: scale(0.97);
}

.action-pill-icon {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    margin-bottom: 5px;
    transition: background 0.2s, transform 0.2s;
}

.action-pill-icon svg {
    width: 17px;
    height: 17px;
    stroke: currentColor;
    fill: none;
    transition: transform 0.2s ease;
}

.action-pill-btn:hover .action-pill-icon svg {
    transform: scale(1.12);
}

.icon-send { background: rgba(245, 166, 35, 0.12); color: var(--gold-primary); }
.icon-receive { background: rgba(16, 185, 129, 0.12); color: var(--emerald-accent); }
.icon-swap { background: rgba(245, 166, 35, 0.18); color: #ffd700; }
.icon-cex { background: rgba(6, 182, 212, 0.14); color: var(--cyan-accent); }

.action-pill-label {
    font-size: 10px;
    font-weight: 700;
    color: var(--text-primary);
}

.pill-badge {
    position: absolute;
    top: -4px;
    right: -2px;
    padding: 1px 5px;
    font-size: 7.5px;
    font-weight: 900;
    border-radius: 20px;
    line-height: 1.2;
}

.pill-badge-dex {
    background: var(--gold-primary);
    color: #000000;
}

.pill-badge-cex {
    background: var(--cyan-accent);
    color: #000000;
}

/* Secondary Actions Bar (Buy, Sell, Portfolio, Notary) */
.secondary-actions-bar {
    display: flex;
    gap: 6px;
    margin-bottom: 14px;
}

.sec-act-btn {
    flex: 1;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-muted);
    border-radius: 10px;
    padding: 7px 4px;
    font-size: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.sec-act-btn:hover {
    background: rgba(245, 166, 35, 0.12);
    border-color: var(--gold-border);
    color: var(--gold-bright);
}

/* Compact Multi-Chain Address Bar */
.wallet-address-bar {
    background: rgba(15, 20, 31, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 10px 12px;
    margin-bottom: 14px;
}

.addr-top-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.addr-tag {
    font-size: 9.5px;
    color: var(--text-dim);
    font-weight: 700;
    text-transform: uppercase;
}

.network-select-luxury {
    background: rgba(10, 14, 24, 0.95) !important;
    color: var(--gold-bright) !important;
    border: 1px solid rgba(245, 166, 35, 0.3) !important;
    border-radius: 8px !important;
    font-size: 10px !important;
    font-weight: 700 !important;
    padding: 3px 8px !important;
    outline: none;
}

.address-value-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}

.wallet-address-bar .address-value {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace !important;
    font-size: 10.5px !important;
    color: #e2e8f0 !important;
    word-break: break-all;
    margin: 0 !important;
}

.address-actions-inline {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
}

.btn-icon-tiny {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #f1f5f9;
    border-radius: 6px;
    padding: 4px 6px;
    font-size: 11px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-icon-tiny:hover {
    background: rgba(245, 166, 35, 0.2);
    border-color: var(--gold-primary);
    color: var(--gold-bright);
}

/* Asset Filter Tabs */
.asset-filter-tabs {
    display: flex;
    gap: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding-bottom: 6px;
    margin-bottom: 10px;
}

.asset-tab-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 11.5px;
    font-weight: 600;
    cursor: pointer;
    padding: 0 2px 6px;
    position: relative;
    transition: color 0.2s;
}

.asset-tab-btn.active {
    color: var(--gold-bright);
    font-weight: 800;
}

.asset-tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -7px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--gold-primary);
    border-radius: 2px;
    box-shadow: 0 0 8px var(--gold-primary);
}

/* Asset Cards List */
.assets-scroll-view {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 260px;
    overflow-y: auto;
    padding-right: 2px;
    margin-bottom: 14px;
}

.assets-scroll-view::-webkit-scrollbar {
    width: 3px;
}
.assets-scroll-view::-webkit-scrollbar-thumb {
    background: rgba(245, 166, 35, 0.25);
    border-radius: 4px;
}

.asset-row-card {
    background: rgba(18, 23, 35, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 16px;
    padding: 10px 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: all 0.2s;
}

.asset-row-card:hover {
    background: rgba(24, 31, 46, 0.95);
    border-color: rgba(245, 166, 35, 0.3);
    transform: translateY(-1px);
}

.asset-row-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.asset-row-badge-icon {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

.badge-nch {
    background: rgba(245, 166, 35, 0.15);
    border: 1px solid rgba(245, 166, 35, 0.3);
}

.badge-usdt {
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: var(--emerald-accent);
    font-weight: 800;
}

.asset-row-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.asset-row-title-row {
    display: flex;
    align-items: center;
    gap: 6px;
}

.asset-row-symbol {
    font-size: 12px;
    font-weight: 800;
    color: #ffffff;
}

.asset-row-pill {
    font-size: 8.5px;
    font-weight: 700;
    padding: 1px 5px;
    border-radius: 4px;
}

.pill-native { background: rgba(245, 166, 35, 0.15); color: var(--gold-bright); }
.pill-stable { background: rgba(148, 163, 184, 0.15); color: #94a3b8; }

.asset-row-price {
    font-size: 10px;
    color: var(--text-muted);
}

.trend-up { color: var(--emerald-accent); font-weight: 700; }
.trend-neutral { color: var(--text-dim); }

.asset-row-right {
    text-align: right;
}

.asset-row-balance {
    font-size: 12px;
    font-weight: 800;
    color: #ffffff;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.asset-row-usd {
    font-size: 10px;
    color: var(--text-muted);
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

/* Security Shield Footer */
.security-shield-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 4px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    font-size: 10px;
    color: var(--text-dim);
}

.shield-indicator {
    display: flex;
    align-items: center;
    gap: 5px;
    color: var(--emerald-accent);
    font-weight: 600;
}

.shield-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--emerald-accent);
}

/* Bottom Dock Navigation */
.shell-bottom-dock {
    flex: 0 0 auto;
    width: 100%;
    box-sizing: border-box;
    display: flex !important;
    justify-content: space-around;
    align-items: center;
    background: rgba(13, 18, 28, 0.96);
    border-top: 1px solid rgba(245, 166, 35, 0.25);
    border-left: none;
    border-right: none;
    border-bottom: none;
    border-radius: 0 0 36px 36px;
    padding: 8px 4px max(10px, env(safe-area-inset-bottom, 10px)) 4px !important;
    margin: 0;
    box-shadow: 0 -6px 20px rgba(0, 0, 0, 0.5);
    z-index: 9999;
}
    z-index: 10;
}

.shell-bottom-dock {
    display: flex !important;
}

.dock-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: transparent !important;
    border: none !important;
    color: var(--text-muted) !important;
    padding: 6px 2px !important;
    cursor: pointer;
    border-radius: 12px;
    transition: all 0.2s;
    outline: none;
    box-shadow: none !important;
}

.dock-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    margin-bottom: 2px;
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.dock-icon svg,
.dock-svg {
    width: 19px;
    height: 19px;
    stroke: currentColor;
    stroke-width: 1.8;
    fill: none;
    transition: stroke 0.2s, filter 0.2s;
}

.dock-label {
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.2px;
}

.dock-btn.active {
    color: var(--gold-bright) !important;
}

.dock-btn.active .dock-icon {
    transform: scale(1.15);
}

.dock-btn.active .dock-icon svg,
.dock-btn.active .dock-svg {
    stroke: var(--gold-bright, #ffd700);
    filter: drop-shadow(0 0 6px rgba(255, 215, 0, 0.5));
}

.dock-btn.active .dock-label {
    color: var(--gold-bright);
}

.dock-btn:hover:not(.active) {
    color: #ffffff !important;
}

.dock-btn:hover:not(.active) .dock-icon svg,
.dock-btn:hover:not(.active) .dock-svg {
    stroke: #ffffff;
}

/* Onboarding & Login Cards */
.onboarding-card {
    text-align: center;
    padding: 30px 18px 26px !important;
    border-radius: 26px !important;
    background: linear-gradient(160deg, #1b2334 0%, #0f131d 100%) !important;
    border: 1px solid var(--gold-border) !important;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.6) !important;
}

.onboarding-logo-glow {
    width: 64px;
    height: 64px;
    margin: 0 auto 16px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(245, 166, 35, 0.3) 0%, transparent 70%);
    border: 2px solid var(--gold-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 25px rgba(245, 166, 35, 0.35);
    overflow: hidden;
}

.onboarding-logo-inner {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.onboarding-title {
    font-size: 19px !important;
    font-weight: 900 !important;
    color: #ffffff !important;
    margin: 0 0 6px !important;
    letter-spacing: -0.3px;
}

.onboarding-subtitle {
    font-size: 11.5px !important;
    color: var(--text-muted) !important;
    line-height: 1.5;
    margin: 0 0 16px !important;
}

.onboarding-features-chips {
    display: flex;
    justify-content: center;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 22px;
}

.feature-chip {
    font-size: 9.5px;
    font-weight: 700;
    color: var(--gold-bright);
    background: rgba(245, 166, 35, 0.1);
    border: 1px solid rgba(245, 166, 35, 0.25);
    padding: 3px 8px;
    border-radius: 20px;
}

.onboarding-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.onboarding-btn-primary {
    background: linear-gradient(135deg, #f5a623 0%, #ffd700 100%) !important;
    color: #000000 !important;
    font-weight: 800 !important;
    font-size: 13px !important;
    padding: 13px 20px !important;
    border-radius: 14px !important;
    border: none !important;
    box-shadow: 0 4px 18px rgba(245, 166, 35, 0.4) !important;
    cursor: pointer;
    transition: all 0.22s;
}

.onboarding-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(245, 166, 35, 0.55) !important;
}

.onboarding-btn-secondary {
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    color: #ffffff !important;
    font-weight: 700 !important;
    font-size: 13px !important;
    padding: 12px 20px !important;
    border-radius: 14px !important;
    cursor: pointer;
    transition: all 0.22s;
}

.onboarding-btn-secondary:hover {
    background: rgba(245, 166, 35, 0.15) !important;
    border-color: var(--gold-primary) !important;
    color: var(--gold-bright) !important;
}

/* Card General Overrides inside Device Frame */
.card {
    background: var(--obsidian-card) !important;
    border: 1px solid var(--gold-border) !important;
    border-radius: 22px !important;
    padding: 18px !important;
    margin-bottom: 16px !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5) !important;
    color: var(--text-primary) !important;
}

.card h2 {
    color: var(--gold-bright) !important;
    font-size: 1.25rem !important;
    font-weight: 800 !important;
}

/* Form inputs & Selects */
input[type="text"],
input[type="number"],
input[type="password"],
select,
textarea {
    background: rgba(10, 14, 24, 0.9) !important;
    color: #f8fafc !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    border-radius: 12px !important;
    padding: 10px 12px !important;
    font-size: 12px !important;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

input:focus, select:focus, textarea:focus {
    border-color: var(--gold-primary) !important;
    box-shadow: 0 0 0 3px rgba(245, 166, 35, 0.2) !important;
}

/* Modals */
.modal {
    backdrop-filter: blur(8px) !important;
    -webkit-backdrop-filter: blur(8px) !important;
    background: rgba(0, 0, 0, 0.8) !important;
}

.modal-content {
    background: linear-gradient(155deg, rgba(22, 28, 42, 0.98) 0%, rgba(11, 15, 23, 1) 100%) !important;
    border: 1px solid var(--gold-border) !important;
    border-radius: 26px !important;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.9), 0 0 35px rgba(245, 166, 35, 0.15) !important;
    color: var(--text-primary) !important;
    max-width: 420px !important;
}

/* Official Logo Display */
.shell-official-logo {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    display: block;
    box-shadow: 0 0 10px rgba(245, 166, 35, 0.4);
}

.onboarding-official-logo {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    display: block;
    box-shadow: 0 0 16px rgba(245, 166, 35, 0.5);
}

/* ========================================================
   LIGHT THEME MODE (Instant Obsidian <-> Luxury Light Toggle)
   ======================================================== */
body.theme-light {
    background-color: #f1f5f9 !important;
    background: radial-gradient(circle at 50% 0%, #ffffff 0%, #e2e8f0 85%) !important;
    color: #0f172a !important;
}

body.theme-light .shell-device-frame {
    background: linear-gradient(155deg, #ffffff 0%, #f8fafc 100%) !important;
    border-color: rgba(217, 119, 6, 0.35) !important;
    box-shadow: 0 25px 60px rgba(100, 116, 139, 0.2), 0 0 35px rgba(245, 166, 35, 0.12) !important;
    color: #0f172a !important;
}

body.theme-light .card {
    background: #ffffff !important;
    border-color: rgba(226, 232, 240, 0.9) !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04) !important;
    color: #0f172a !important;
}

body.theme-light .card h2,
body.theme-light .card h3,
body.theme-light .onboarding-title,
body.theme-light .balance-val {
    color: #0f172a !important;
}

body.theme-light .onboarding-subtitle,
body.theme-light .balance-sub,
body.theme-light .asset-row-price {
    color: #64748b !important;
}

body.theme-light .shell-account-name,
body.theme-light .asset-row-symbol {
    color: #0f172a !important;
}

body.theme-light .shell-addr-preview {
    color: #64748b !important;
    background: rgba(0, 0, 0, 0.05) !important;
}

body.theme-light .shell-account-row {
    background: rgba(0, 0, 0, 0.04) !important;
    border-color: rgba(0, 0, 0, 0.08) !important;
}

body.theme-light .balance-glow-card {
    background: linear-gradient(135deg, #ffffff 0%, #fef3c7 100%) !important;
    border-color: rgba(217, 119, 6, 0.35) !important;
    box-shadow: 0 10px 28px rgba(245, 166, 35, 0.12) !important;
}

body.theme-light .asset-row-card {
    background: #f8fafc !important;
    border-color: rgba(226, 232, 240, 0.9) !important;
}

body.theme-light .asset-row-card:hover {
    background: #f1f5f9 !important;
}

body.theme-light .asset-row-balance {
    color: #0f172a !important;
}

body.theme-light .shell-header {
    background: rgba(255, 255, 255, 0.96) !important;
    border-bottom: 1px solid rgba(226, 232, 240, 0.95) !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04) !important;
}

body.theme-light .shell-bottom-dock {
    background: rgba(255, 255, 255, 0.94) !important;
    border-color: rgba(226, 232, 240, 0.95) !important;
    box-shadow: 0 -8px 25px rgba(0, 0, 0, 0.06) !important;
}

body.theme-light .dock-btn {
    color: #64748b !important;
}

body.theme-light .dock-btn.active {
    color: #d97706 !important;
}

body.theme-light .action-pill-btn {
    background: #f8fafc !important;
    border-color: rgba(226, 232, 240, 0.9) !important;
    color: #0f172a !important;
}

body.theme-light .action-pill-label {
    color: #334155 !important;
}

body.theme-light .shell-action-btn {
    background: rgba(0, 0, 0, 0.05) !important;
    border-color: rgba(0, 0, 0, 0.1) !important;
    color: #0f172a !important;
}

body.theme-light input[type="text"],
body.theme-light input[type="number"],
body.theme-light input[type="password"],
body.theme-light select,
body.theme-light textarea {
    background: #ffffff !important;
    color: #0f172a !important;
    border-color: rgba(203, 213, 225, 0.9) !important;
}

body.theme-light .multi-wallet-modal-dialog {
    background: #ffffff !important;
    color: #0f172a !important;
    border-color: rgba(217, 119, 6, 0.35) !important;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.25) !important;
}

body.theme-light .mw-wallet-item {
    background: #f8fafc !important;
    border-color: rgba(226, 232, 240, 0.9) !important;
}

body.theme-light .mw-wallet-item.active {
    background: #fffbeb !important;
    border-color: #f59e0b !important;
}

/* ========================================================
   MULTI-WALLET & MANAGE TOKENS MODAL SYSTEM
   ======================================================== */
.multi-wallet-modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
    box-sizing: border-box;
}

.multi-wallet-modal-dialog {
    background: #0f1422;
    border: 1px solid rgba(245, 166, 35, 0.4);
    border-radius: 26px;
    width: 100%;
    max-width: 420px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.9), 0 0 35px rgba(245, 166, 35, 0.2);
    animation: mwModalPop 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    box-sizing: border-box;
    padding: 20px;
    color: #f8fafc;
}

@keyframes mwModalPop {
    from { opacity: 0; transform: scale(0.94) translateY(12px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.multi-wallet-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.modal-close-btn {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #cbd5e1;
    font-size: 14px;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.modal-close-btn:hover {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
    border-color: rgba(239, 68, 68, 0.4);
}

.mw-section-title {
    font-size: 11px;
    font-weight: 700;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
}

.mw-wallets-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 48vh;
    overflow-y: auto;
    padding-right: 4px;
}

.mw-wallet-item {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 12px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    transition: all 0.2s;
}

.mw-wallet-item:hover {
    background: rgba(245, 166, 35, 0.08);
    border-color: rgba(245, 166, 35, 0.3);
}

.mw-wallet-item.active {
    background: rgba(245, 166, 35, 0.12);
    border-color: #ffd700;
    box-shadow: 0 0 15px rgba(245, 166, 35, 0.15);
}

.mw-wallet-meta {
    display: flex;
    flex-direction: column;
    gap: 3px;
    text-align: left;
}

.mw-wallet-name {
    font-size: 13px;
    font-weight: 700;
    color: #ffd700;
    display: flex;
    align-items: center;
    gap: 6px;
}

.mw-wallet-addr {
    font-size: 11px;
    font-family: monospace;
    color: #94a3b8;
}

.mw-wallet-badge {
    font-size: 10px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 10px;
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.35);
}

.mw-tabs-bar {
    display: flex;
    gap: 6px;
    background: rgba(0, 0, 0, 0.3);
    padding: 4px;
    border-radius: 12px;
    margin-bottom: 14px;
}

.mw-tab-btn {
    flex: 1;
    padding: 8px 10px;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: #94a3b8;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
}

.mw-tab-btn.active {
    background: #f5a623;
    color: #07090e;
    box-shadow: 0 2px 8px rgba(245, 166, 35, 0.4);
}

.mw-input {
    width: 100%;
    box-sizing: border-box;
    background: rgba(0, 0, 0, 0.4) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    border-radius: 10px !important;
    padding: 10px 12px !important;
    color: #ffffff !important;
    font-size: 12px !important;
    outline: none;
}

.mw-textarea {
    resize: vertical;
    font-family: monospace;
}

.btn-text-back {
    background: none;
    border: none;
    color: #94a3b8;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    padding: 0;
    transition: color 0.2s;
}

.btn-text-back:hover {
    color: #ffd700;
}

.tok-list-scroll {
    max-height: 40vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.tok-item-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
}

/* Dynamic Chain & Token Dropdown Badges */
.chain-dropdown-wrap {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(0, 0, 0, 0.25);
    padding: 2px 8px;
    border-radius: 10px;
    border: 1px solid rgba(255, 215, 0, 0.25);
}

.chain-dropdown-wrap img {
    width: 17px;
    height: 17px;
    border-radius: 50%;
    object-fit: cover;
    display: inline-block;
    flex-shrink: 0;
}

/* Multi-Chain Filter Pills */
.chain-filters-scroll {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding: 2px 0 8px 0;
    margin-bottom: 6px;
    scrollbar-width: none;
}
.chain-filters-scroll::-webkit-scrollbar {
    display: none;
}
.chain-filter-pill {
    padding: 5px 12px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.04);
    color: #94a3b8;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.chain-filter-pill:hover {
    color: #ffd700;
    border-color: rgba(245, 166, 35, 0.35);
    background: rgba(245, 166, 35, 0.08);
}
.chain-filter-pill.active {
    background: linear-gradient(135deg, rgba(245, 166, 35, 0.28), rgba(255, 215, 0, 0.18));
    border-color: #ffd700;
    color: #ffd700;
    font-weight: 700;
    box-shadow: 0 0 10px rgba(245, 166, 35, 0.2);
}

/* Floating Chain Badge on Token Icon (Pixel-Perfect Alignment) */
.asset-row-badge-icon {
    position: relative !important;
    width: 36px !important;
    height: 36px !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0 !important;
    background: rgba(255, 255, 255, 0.05);
}

.asset-token-logo {
    width: 36px !important;
    height: 36px !important;
    border-radius: 50% !important;
    object-fit: cover !important;
    display: block !important;
}

.asset-token-fallback {
    font-size: 1.25rem !important;
    width: 36px !important;
    height: 36px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.asset-chain-badge {
    position: absolute !important;
    bottom: -2px !important;
    right: -2px !important;
    width: 15px !important;
    height: 15px !important;
    border-radius: 50% !important;
    border: 1.5px solid #07090e !important;
    background: #1e293b !important;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.6) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    overflow: hidden !important;
    line-height: 1 !important;
    z-index: 2 !important;
}

.asset-chain-badge img {
    width: 100% !important;
    height: 100% !important;
    border-radius: 50% !important;
    object-fit: cover !important;
    display: block !important;
}

/* Obsidian Portfolio Card & Token List Styling */
#portfolio-tokens-list {
    background: rgba(15, 23, 42, 0.75) !important;
    border: 1px solid rgba(255, 215, 0, 0.2) !important;
    backdrop-filter: blur(12px) !important;
}
.portfolio-token-item {
    background: transparent !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
    transition: background 0.2s ease !important;
}
.portfolio-token-item:hover {
    background: rgba(255, 215, 0, 0.06) !important;
}
.portfolio-token-item div[style*="color: #333"] {
    color: #f8fafc !important;
}
.portfolio-token-item div[style*="color: #666"] {
    color: #94a3b8 !important;
}
body.theme-light #portfolio-tokens-list {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
}
body.theme-light .portfolio-token-item div[style*="color: #333"] {
    color: #0f172a !important;
}
body.theme-light .portfolio-token-item div[style*="color: #666"] {
    color: #64748b !important;
}

/* ========================================================
   MOBILE BOUNDARY LOCK & IMMOVABLE APP SHELL (MAX-WIDTH: 640PX)
   - Header is immovable and pinned to the top (safe-area aware)
   - Bottom Dock is immovable and pinned to the very bottom edge (zero dead space)
   - Middle content (.main-content) smoothly scrolls up & down with all tokens
   ======================================================== */
@media (max-width: 640px) {
    html {
        width: 100% !important;
        max-width: 100% !important;
        height: 100% !important;
        height: 100dvh !important;
        max-height: 100dvh !important;
        overflow: hidden !important;
        touch-action: pan-y !important;
        -webkit-text-size-adjust: 100%;
    }

    body {
        width: 100% !important;
        max-width: 100% !important;
        height: 100% !important;
        height: 100dvh !important;
        max-height: 100dvh !important;
        overflow: hidden !important;
        overscroll-behavior: none !important;
        touch-action: pan-y !important;
        margin: 0 !important;
        padding: 0 !important;
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
    }

    .wallet-app-wrapper {
        padding: 0 !important;
        margin: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        height: 100% !important;
        height: 100dvh !important;
        max-height: 100dvh !important;
        overflow: hidden !important;
        display: flex !important;
        flex-direction: column !important;
        box-sizing: border-box !important;
    }

    .shell-device-frame {
        width: 100% !important;
        max-width: 100% !important;
        height: 100% !important;
        height: 100dvh !important;
        max-height: 100dvh !important;
        border-radius: 0 !important;
        border: none !important;
        box-shadow: none !important;
        padding: 0 !important;
        margin: 0 !important;
        display: flex !important;
        flex-direction: column !important;
        overflow: hidden !important;
        position: relative !important;
        box-sizing: border-box !important;
    }

    /* Immovable Top Header Pinned to Top */
    .shell-header {
        flex: 0 0 auto !important;
        width: 100% !important;
        box-sizing: border-box !important;
        margin: 0 !important;
        padding-top: calc(10px + env(safe-area-inset-top, 0px)) !important;
        padding-bottom: 10px !important;
        padding-left: 14px !important;
        padding-right: 14px !important;
        background: rgba(10, 14, 22, 0.98) !important;
        backdrop-filter: blur(25px) !important;
        -webkit-backdrop-filter: blur(25px) !important;
        border-bottom: 1px solid rgba(245, 166, 35, 0.22) !important;
        z-index: 100 !important;
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5) !important;
    }

    /* Scrollable Middle Container: Tokens, Balances & Screen Content */
    .shell-device-frame .main-content {
        flex: 1 1 0% !important;
        min-height: 0 !important;
        height: 100% !important;
        max-height: 100% !important;
        box-sizing: border-box !important;
        overflow-y: auto !important;
        overflow-x: hidden !important;
        -webkit-overflow-scrolling: touch !important;
        overscroll-behavior-y: contain !important;
        padding: 14px 12px 24px 12px !important;
    }

    .balance-section.balance-card-glow {
        border-radius: 20px !important;
        padding: 16px 14px 12px !important;
        margin-bottom: 14px !important;
    }

    .balance-sparkline-svg {
        height: 44px !important;
    }

    .quick-action-pills-grid {
        gap: 6px !important;
        margin-bottom: 12px !important;
    }

    .action-pill-btn {
        padding: 8px 2px 6px !important;
        border-radius: 14px !important;
    }

    .action-pill-icon {
        width: 32px !important;
        height: 32px !important;
        font-size: 13px !important;
        margin-bottom: 3px !important;
    }

    .action-pill-label {
        font-size: 9.5px !important;
    }

    .assets-scroll-view {
        max-height: none !important;
        margin-bottom: 14px !important;
    }

    .asset-row-card {
        padding: 10px 10px !important;
        border-radius: 14px !important;
    }

    .card {
        border-radius: 18px !important;
        padding: 18px 14px !important;
    }

    /* Immovable Bottom Dock Navigation Pinned To Very Bottom Edge */
    .shell-bottom-dock {
        flex: 0 0 auto !important;
        width: 100% !important;
        box-sizing: border-box !important;
        margin: 0 !important;
        border-radius: 0 !important;
        border-left: none !important;
        border-right: none !important;
        border-bottom: none !important;
        border-top: 1px solid rgba(245, 166, 35, 0.25) !important;
        padding-top: 8px !important;
        padding-bottom: calc(8px + env(safe-area-inset-bottom, 0px)) !important;
        padding-left: 6px !important;
        padding-right: 6px !important;
        background: rgba(10, 14, 22, 0.98) !important;
        backdrop-filter: blur(25px) !important;
        -webkit-backdrop-filter: blur(25px) !important;
        z-index: 100 !important;
        box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.6) !important;
    }
}
