:root {
    --bg-dark: #09090b; --bg-surface: #18181b; --bg-surface-hover: #27272a;
    --text-main: #f8fafc; --text-muted: #a1a1aa; --accent-emerald: #10b981; --accent-red: #ef4444;
    --border-subtle: #27272a; --font-main: 'Inter', sans-serif;
}
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');
* { margin: 0; padding: 0; box-sizing: border-box; font-family: var(--font-main); -webkit-tap-highlight-color: transparent; }
body.dark-theme { background-color: var(--bg-dark); color: var(--text-main); padding-bottom: 100px; padding-top: 70px; }

/* Auth Pages */
.auth-container { display: flex; justify-content: center; align-items: center; height: 100vh; padding: 20px; }
.auth-card { background: var(--bg-surface); border: 1px solid var(--border-subtle); padding: 40px; border-radius: 20px; width: 100%; max-width: 400px; text-align: center; }
.auth-card h2 { margin-bottom: 20px; font-size: 24px; }
.auth-card input { width: 100%; padding: 15px; background: var(--bg-dark); border: 1px solid var(--border-subtle); border-radius: 10px; color: white; margin-bottom: 15px; outline: none; }
.auth-card button { width: 100%; padding: 15px; background: var(--accent-emerald); color: white; border: none; border-radius: 10px; font-weight: 700; font-size: 16px; cursor: pointer; margin-bottom: 15px; }
.auth-link { color: var(--text-muted); font-size: 14px; cursor: pointer; text-decoration: underline; }
.error-msg { color: var(--accent-red); font-size: 13px; margin-bottom: 10px; display: none; }

/* Top Bar */
.top-bar { position: fixed; top: 0; left: 0; width: 100%; height: 70px; background: rgba(9, 9, 11, 0.8); backdrop-filter: blur(12px); display: flex; justify-content: space-between; align-items: center; padding: 0 25px; border-bottom: 1px solid var(--border-subtle); z-index: 100; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; letter-spacing: 1px; }
.logo-icon { width: 32px; height: 32px; background: var(--accent-emerald); border-radius: 8px; display: flex; justify-content: center; align-items: center; color: white; }
.btn-install, .btn-logout { background: var(--bg-surface); border: 1px solid var(--border-subtle); color: var(--text-main); padding: 8px 16px; border-radius: 20px; font-size: 12px; font-weight: 600; cursor: pointer; }
.btn-logout { background: var(--accent-red); color: white; border: none; }

/* Views */
.view-section { display: none; padding: 25px; animation: fadeIn 0.3s ease; }
.view-section.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* Portfolio */
.welcome-header { margin-bottom: 30px; }
.welcome-header p { color: var(--text-muted); font-size: 14px; font-weight: 500; }
.welcome-header h1 { font-size: 42px; font-weight: 800; margin: 5px 0; letter-spacing: -1px; }
.change-badge { background: rgba(16, 185, 129, 0.15); color: var(--accent-emerald); padding: 4px 10px; border-radius: 20px; font-size: 13px; font-weight: 700; display: inline-block; }
.live-price-box { background: var(--bg-surface); border: 1px solid var(--border-subtle); padding: 15px; border-radius: 12px; margin-bottom: 20px; display: flex; justify-content: space-between; align-items: center; }
.live-price-box span { font-weight: 700; color: var(--accent-emerald); }

.asset-grid { display: flex; flex-direction: column; gap: 15px; margin-bottom: 30px; }
.asset-card { background: var(--bg-surface); border: 1px solid var(--border-subtle); border-radius: 16px; padding: 20px; display: flex; align-items: center; gap: 15px; }
.asset-icon { width: 45px; height: 45px; border-radius: 50%; display: flex; justify-content: center; align-items: center; font-size: 20px; font-weight: 700; color: white; background: #26a17b; }
.asset-info { flex-grow: 1; } .ticker { display: block; font-weight: 700; font-size: 16px; } .name { font-size: 13px; color: var(--text-muted); } .asset-value { font-weight: 800; font-size: 18px; }

.section-title { font-size: 18px; font-weight: 700; margin-bottom: 15px; }
.action-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.action-btn { background: var(--bg-surface); border: 1px solid var(--border-subtle); border-radius: 12px; padding: 15px 10px; color: var(--text-main); font-weight: 600; display: flex; flex-direction: column; align-items: center; gap: 8px; cursor: pointer; }
.action-btn span { font-size: 24px; }

/* Forms */
.page-title { display: flex; align-items: center; gap: 15px; margin-bottom: 25px; }
.back-btn { background: var(--bg-surface); border: 1px solid var(--border-subtle); color: white; width: 40px; height: 40px; border-radius: 50%; font-size: 18px; cursor: pointer; display: flex; justify-content: center; align-items: center; }
.action-card { background: var(--bg-surface); border: 1px solid var(--border-subtle); border-radius: 20px; padding: 25px; }
.form-label { display: block; font-size: 14px; color: var(--text-muted); margin-bottom: 8px; font-weight: 600; }
.input-field { width: 100%; background: var(--bg-dark); border: 1px solid var(--border-subtle); padding: 15px; border-radius: 12px; color: white; font-size: 16px; outline: none; margin-bottom: 15px; }
.btn-primary { width: 100%; background: var(--accent-emerald); color: white; border: none; padding: 18px; border-radius: 12px; font-weight: 800; font-size: 16px; cursor: pointer; }
.info-box { background: rgba(59, 130, 246, 0.1); border: 1px dashed #3b82f6; padding: 15px; border-radius: 12px; margin-top: 15px; }
.info-box p { font-size: 13px; color: #93c5fd; margin-bottom: 8px; }
.info-box .address { font-size: 16px; font-weight: 700; color: white; word-break: break-all; }

/* Chat */
.chat-container { background: var(--bg-surface); border: 1px solid var(--border-subtle); border-radius: 20px; height: 350px; padding: 20px; overflow-y: auto; display: flex; flex-direction: column; gap: 15px; margin-bottom: 15px; }
.msg { max-width: 80%; padding: 12px 18px; border-radius: 16px; font-size: 14px; }
.msg.received { background: var(--bg-surface-hover); align-self: flex-start; border-bottom-left-radius: 4px; }
.msg.sent { background: var(--accent-emerald); color: white; align-self: flex-end; border-bottom-right-radius: 4px; }
.chat-input-area { display: flex; gap: 10px; }
.chat-input-area input { flex-grow: 1; background: var(--bg-surface); border: 1px solid var(--border-subtle); padding: 15px; border-radius: 30px; color: white; outline: none; }
.chat-input-area button { background: var(--accent-emerald); color: white; border: none; padding: 0 25px; border-radius: 30px; font-weight: 700; cursor: pointer; }

/* Bottom Dock */
.bottom-dock { position: fixed; bottom: 25px; left: 50%; transform: translateX(-50%); background: rgba(24, 24, 27, 0.9); backdrop-filter: blur(10px); border: 1px solid var(--border-subtle); border-radius: 40px; display: flex; gap: 20px; padding: 10px 25px; z-index: 100; }
.dock-item { padding: 10px; border-radius: 50%; cursor: pointer; }
.dock-item .icon { font-size: 22px; opacity: 0.5; }
.dock-item.active { background: rgba(16, 185, 129, 0.2); }
.dock-item.active .icon { opacity: 1; }