/* Pulse — Mobile-First Financial Dashboard */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
    --bg-primary: #0a0d14;
    --bg-secondary: #0f1219;
    --bg-card: #151a23;
    --bg-card-hover: #1a2030;
    --bg-input: #1a1f2b;
    --bg-sheet: #111622;
    --border: #2d3748;
    --border-light: #3d4a5c;
    --text-primary: #e2e8f0;
    --text-secondary: #a0aec0;
    --text-dim: #718096;
    --accent: #4a90e2;
    --accent-hover: #5a9ff2;
    --accent-bg: rgba(74, 144, 226, 0.1);
    --gain: #26a69a;
    --gain-bg: rgba(38, 166, 154, 0.1);
    --loss: #ef5350;
    --loss-bg: rgba(239, 83, 80, 0.1);
    --warning: #ffa726;
    --warning-bg: rgba(255, 167, 38, 0.1);
    --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
    --radius: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 4px 12px rgba(0, 0, 0, 0.4);
    --nav-height: 60px;
    --safe-bottom: env(safe-area-inset-bottom, 0px);
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
    font-size: 15px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-sans);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.5;
    min-height: 100vh;
    min-height: 100dvh;
    overflow-x: hidden;
    padding-bottom: calc(var(--nav-height) + var(--safe-bottom));
}

/* Typography */
h1 { font-size: 1.5rem; font-weight: 700; }
h2 { font-size: 1.25rem; font-weight: 600; }
h3 { font-size: 1.1rem; font-weight: 600; }
.mono { font-family: var(--font-mono); }
.text-secondary { color: var(--text-secondary); }
.text-dim { color: var(--text-dim); }
.text-gain { color: var(--gain); }
.text-loss { color: var(--loss); }
.text-accent { color: var(--accent); }

/* Layout */
.app-shell {
    max-width: 100%;
    min-height: 100vh;
    min-height: 100dvh;
}

.page {
    padding: 16px;
    padding-top: 8px;
    max-width: 600px;
    margin: 0 auto;
}

@media (min-width: 768px) {
    .page { max-width: 800px; padding: 24px; }
}

@media (min-width: 1024px) {
    .page { max-width: 1000px; }
}

/* Top Bar */
.top-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 50;
}

.top-bar-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: 1.15rem;
    letter-spacing: 0.5px;
}

.top-bar-brand .pulse-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent);
    animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 4px var(--accent); opacity: 1; }
    50% { box-shadow: 0 0 12px var(--accent); opacity: 0.7; }
}

.top-bar-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.icon-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: var(--bg-card);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    font-size: 1.1rem;
}

.icon-btn:hover { background: var(--bg-card-hover); color: var(--text-primary); }

/* Bottom Nav */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: calc(var(--nav-height) + var(--safe-bottom));
    padding-bottom: var(--safe-bottom);
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-around;
    z-index: 100;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 6px 12px;
    border: none;
    background: none;
    color: var(--text-dim);
    font-family: var(--font-sans);
    font-size: 0.65rem;
    font-weight: 500;
    cursor: pointer;
    transition: color 0.15s;
    -webkit-tap-highlight-color: transparent;
}

.nav-item .nav-icon { font-size: 1.35rem; }
.nav-item.active { color: var(--accent); }
.nav-item:hover { color: var(--text-secondary); }

/* Cards */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 16px;
    transition: background 0.15s, border-color 0.15s;
}

.card:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-light);
}

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

.card-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Section Headers */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 20px 0 12px;
}

.section-title {
    font-size: 1rem;
    font-weight: 600;
}

.section-action {
    font-size: 0.8rem;
    color: var(--accent);
    cursor: pointer;
    border: none;
    background: none;
    font-family: var(--font-sans);
}

/* Market Card (horizontal scroll) */
.scroll-row {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 2px 0 8px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.scroll-row::-webkit-scrollbar { display: none; }

.market-chip {
    flex-shrink: 0;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 10px 14px;
    min-width: 140px;
    cursor: pointer;
    transition: border-color 0.15s;
}

.market-chip:hover { border-color: var(--accent); }

.market-chip .symbol {
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 2px;
}

.market-chip .price {
    font-family: var(--font-mono);
    font-size: 0.95rem;
    font-weight: 500;
}

.market-chip .change {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 500;
}

/* List Items */
.list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}

.list-item:last-child { border-bottom: none; }

.list-item-left {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 0;
}

.list-item-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--bg-input);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 0.9rem;
}

.list-item-icon img {
    width: 24px;
    height: 24px;
    border-radius: 50%;
}

.list-item-info {
    min-width: 0;
}

.list-item-name {
    font-weight: 500;
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.list-item-sub {
    font-size: 0.75rem;
    color: var(--text-dim);
}

.list-item-right {
    text-align: right;
    flex-shrink: 0;
}

.list-item-value {
    font-family: var(--font-mono);
    font-weight: 500;
    font-size: 0.9rem;
}

.list-item-change {
    font-family: var(--font-mono);
    font-size: 0.75rem;
}

/* Interest Chips (onboarding + explore) */
.interest-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

@media (min-width: 480px) {
    .interest-grid { grid-template-columns: repeat(3, 1fr); }
}

.interest-chip {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 16px 12px;
    background: var(--bg-card);
    border: 2px solid var(--border);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
    font-family: var(--font-sans);
    color: var(--text-primary);
    text-align: center;
}

.interest-chip:hover { border-color: var(--border-light); }

.interest-chip.selected {
    border-color: var(--accent);
    background: var(--accent-bg);
}

.interest-chip .chip-icon { font-size: 1.5rem; }

.interest-chip .chip-label {
    font-size: 0.8rem;
    font-weight: 500;
}

/* Prediction Card */
.prediction-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 14px;
    margin-bottom: 10px;
}

.prediction-card .question {
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 8px;
    line-height: 1.4;
}

.prediction-bar {
    display: flex;
    height: 28px;
    border-radius: var(--radius);
    overflow: hidden;
    font-size: 0.75rem;
    font-weight: 600;
}

.prediction-bar .yes {
    background: var(--gain-bg);
    color: var(--gain);
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
}

.prediction-bar .no {
    background: var(--loss-bg);
    color: var(--loss);
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
}

.prediction-meta {
    display: flex;
    justify-content: space-between;
    margin-top: 6px;
    font-size: 0.7rem;
    color: var(--text-dim);
}

/* News Card */
.news-card {
    display: flex;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}

.news-card:last-child { border-bottom: none; }

.news-card .news-text {
    flex: 1;
    min-width: 0;
}

.news-card .news-headline {
    font-size: 0.85rem;
    font-weight: 500;
    line-height: 1.3;
    margin-bottom: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-card .news-source {
    font-size: 0.7rem;
    color: var(--text-dim);
}

.news-card .news-thumb {
    width: 60px;
    height: 60px;
    border-radius: var(--radius);
    object-fit: cover;
    flex-shrink: 0;
}

/* Macro Indicator */
.indicator-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

@media (min-width: 600px) {
    .indicator-grid { grid-template-columns: repeat(3, 1fr); }
}

.indicator-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 12px;
}

.indicator-card .ind-name {
    font-size: 0.7rem;
    color: var(--text-dim);
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.indicator-card .ind-value {
    font-family: var(--font-mono);
    font-size: 1.05rem;
    font-weight: 600;
}

.indicator-card .ind-change {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    margin-top: 2px;
}

/* Fear & Greed Gauge */
.fear-greed {
    text-align: center;
    padding: 16px;
}

.fg-value {
    font-family: var(--font-mono);
    font-size: 2.5rem;
    font-weight: 700;
}

.fg-label {
    font-size: 0.85rem;
    font-weight: 500;
    margin-top: 4px;
}

.fg-bar {
    height: 8px;
    border-radius: 4px;
    background: linear-gradient(to right, var(--loss), var(--warning), var(--gain));
    margin-top: 12px;
    position: relative;
}

.fg-marker {
    position: absolute;
    top: -3px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--text-primary);
    border: 2px solid var(--bg-primary);
    transform: translateX(-50%);
    transition: left 0.3s;
}

/* Search */
.search-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 10px 14px;
    margin-bottom: 16px;
}

.search-bar input {
    flex: 1;
    background: none;
    border: none;
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 0.95rem;
    outline: none;
}

.search-bar input::placeholder { color: var(--text-dim); }

.search-bar .search-icon { color: var(--text-dim); font-size: 1.1rem; }

/* Badges / Tags */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    font-family: var(--font-mono);
}

.badge-gain { background: var(--gain-bg); color: var(--gain); }
.badge-loss { background: var(--loss-bg); color: var(--loss); }
.badge-neutral { background: var(--accent-bg); color: var(--accent); }

/* Settings */
.settings-section {
    margin-bottom: 24px;
}

.settings-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
}

.settings-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}

.settings-row:last-child { border-bottom: none; }

.toggle {
    position: relative;
    width: 44px;
    height: 24px;
}

.toggle input { opacity: 0; width: 0; height: 0; }

.toggle-track {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: var(--border);
    border-radius: 12px;
    cursor: pointer;
    transition: background 0.2s;
}

.toggle input:checked + .toggle-track { background: var(--accent); }

.toggle-thumb {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--text-primary);
    transition: transform 0.2s;
    pointer-events: none;
}

.toggle input:checked ~ .toggle-thumb { transform: translateX(20px); }

/* DeFi Protocol Row */
.protocol-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
}

.protocol-row:last-child { border-bottom: none; }

.protocol-logo {
    width: 28px;
    height: 28px;
    border-radius: 50%;
}

.protocol-name {
    flex: 1;
    font-weight: 500;
    font-size: 0.85rem;
}

.protocol-tvl {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    text-align: right;
}

/* Skeleton Loading */
.skeleton {
    background: linear-gradient(90deg, var(--bg-card) 25%, var(--bg-card-hover) 50%, var(--bg-card) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--radius);
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.skeleton-line {
    height: 14px;
    margin-bottom: 8px;
    border-radius: 4px;
}

.skeleton-line.w-60 { width: 60%; }
.skeleton-line.w-80 { width: 80%; }
.skeleton-line.w-40 { width: 40%; }

/* Onboarding */
.onboarding {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px;
    text-align: center;
}

.onboarding h1 { margin-bottom: 8px; }
.onboarding .subtitle {
    color: var(--text-secondary);
    margin-bottom: 32px;
    font-size: 0.9rem;
}

.onboarding .cta-btn {
    margin-top: 24px;
    padding: 14px 32px;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: var(--radius-lg);
    font-family: var(--font-sans);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
    width: 100%;
    max-width: 300px;
}

.onboarding .cta-btn:hover { background: var(--accent-hover); }
.onboarding .cta-btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* Reddit Trending */
.trending-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
}

.trending-rank {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-dim);
    width: 24px;
    text-align: center;
}

.trending-symbol {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--accent);
    min-width: 60px;
}

.trending-mentions {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-left: auto;
}

/* Utilities */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.mt-2 { margin-top: 8px; }
.mt-4 { margin-top: 16px; }
.mb-2 { margin-bottom: 8px; }
.mb-4 { margin-bottom: 16px; }
.p-3 { padding: 12px; }
.p-4 { padding: 16px; }
.w-full { width: 100%; }
.text-center { text-align: center; }
.hidden { display: none !important; }

/* Empty State */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-dim);
}

.empty-state .empty-icon { font-size: 2rem; margin-bottom: 12px; }
.empty-state .empty-text { font-size: 0.9rem; }

/* Pill Tabs */
.pill-tabs {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding: 2px 0;
    scrollbar-width: none;
}

.pill-tabs::-webkit-scrollbar { display: none; }

.pill-tab {
    flex-shrink: 0;
    padding: 6px 14px;
    border-radius: 20px;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text-secondary);
    font-family: var(--font-sans);
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
}

.pill-tab:hover { border-color: var(--border-light); }
.pill-tab.active {
    background: var(--accent);
    border-color: var(--accent);
    color: white;
}

/* Market Status */
.market-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    margin-left: 8px;
    font-family: var(--font-sans);
}

.status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    flex-shrink: 0;
}

.dot-open {
    background: var(--gain);
    box-shadow: 0 0 6px var(--gain);
    animation: pulse-glow 2s ease-in-out infinite;
}

.dot-closed {
    background: var(--text-dim);
}

@media (max-width: 380px) {
    .market-status-pill { display: none; }
}

/* Charts */
.chart-section {
    padding: 12px !important;
}

.chart-container {
    width: 100%;
    height: 220px;
    border-radius: var(--radius);
    overflow: hidden;
}

.chart-section .pill-tabs {
    justify-content: center;
}

/* Sparklines */
.sparkline-svg {
    width: 60px;
    height: 24px;
    flex-shrink: 0;
    margin: 0 4px;
}

@media (max-width: 360px) {
    .sparkline-svg { width: 40px; }
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    top: env(safe-area-inset-top, 12px);
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    pointer-events: none;
}

.toast {
    padding: 10px 20px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 500;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    transition: opacity 0.3s, transform 0.3s;
    margin-top: 8px;
    white-space: nowrap;
}

.toast-success {
    background: rgba(38, 166, 154, 0.9);
    color: #fff;
}

.toast-error {
    background: rgba(239, 83, 80, 0.9);
    color: #fff;
}

.toast-info {
    background: rgba(255, 255, 255, 0.12);
    color: var(--text-primary);
    border: 1px solid var(--border);
}

/* Error State */
.error-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 32px 16px;
    text-align: center;
}

.error-state .error-icon {
    font-size: 2rem;
    margin-bottom: 12px;
    opacity: 0.6;
}

.error-state .error-text {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-bottom: 12px;
}

.retry-btn {
    padding: 8px 20px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--accent);
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s;
}

.retry-btn:hover {
    background: rgba(255, 255, 255, 0.05);
}

/* Page Transitions */
.page {
    animation: fadeUp 0.2s ease-out;
}

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

@keyframes slideIn {
    from { opacity: 0; transform: translateX(40px); }
    to { opacity: 1; transform: translateX(0); }
}

.detail-slide {
    animation: slideIn 0.25s ease-out;
}

/* Micro-interactions */
.market-chip {
    transition: transform 0.15s, box-shadow 0.15s;
}

.market-chip:active {
    transform: scale(0.96);
}

.list-item {
    transition: background 0.15s, transform 0.1s;
}

.list-item:active {
    transform: scale(0.98);
    background: var(--bg-card-hover);
}

.interest-chip {
    transition: all 0.2s ease;
}

.interest-chip:active {
    transform: scale(0.94);
}

.icon-btn {
    transition: transform 0.15s, opacity 0.15s;
}

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

.pill-tab {
    transition: all 0.2s ease;
}

.pill-tab:active {
    transform: scale(0.95);
}

.cta-btn {
    transition: all 0.2s ease;
}

.cta-btn:active:not(:disabled) {
    transform: scale(0.97);
}

.nav-item {
    transition: color 0.2s, transform 0.15s;
}

.nav-item:active {
    transform: scale(0.9);
}

.card {
    transition: transform 0.15s;
}

.prediction-card {
    transition: transform 0.15s;
}

.prediction-card:active {
    transform: scale(0.98);
}

/* Portfolio Summary Card */
.summary-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 20px;
    margin-bottom: 16px;
}

.summary-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.summary-value {
    font-family: var(--font-mono);
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
}

/* Allocation Bar */
.allocation-bar {
    display: flex;
    height: 8px;
    border-radius: 4px;
    overflow: hidden;
    gap: 2px;
}

.allocation-segment {
    height: 100%;
    min-width: 4px;
    border-radius: 2px;
    transition: width 0.3s ease;
}

/* Add Holding Button */
.add-holding-btn {
    width: 100%;
    padding: 14px;
    margin-top: 12px;
    margin-bottom: 16px;
    background: var(--accent-bg);
    border: 1px dashed var(--accent);
    border-radius: var(--radius-lg);
    color: var(--accent);
    font-family: var(--font-sans);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
}

.add-holding-btn:hover {
    background: rgba(74, 144, 226, 0.2);
}

.add-holding-btn:active {
    transform: scale(0.98);
}

/* Modal Overlay */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 200;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

/* Modal Bottom Sheet */
.modal-sheet {
    background: var(--bg-card);
    border-top-left-radius: var(--radius-xl);
    border-top-right-radius: var(--radius-xl);
    padding: 24px 20px;
    padding-bottom: calc(24px + var(--safe-bottom));
    width: 100%;
    max-width: 500px;
    max-height: 85vh;
    overflow-y: auto;
    animation: slideUp 0.25s ease-out;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

@keyframes slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

/* Modal Form Fields */
.modal-field {
    margin-bottom: 14px;
}

.modal-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}

.modal-input {
    width: 100%;
    padding: 10px 14px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.15s;
}

.modal-input:focus {
    border-color: var(--accent);
}

.modal-input::placeholder {
    color: var(--text-dim);
}

.modal-input[readonly] {
    opacity: 0.7;
    cursor: default;
}

/* Modal Buttons */
.modal-btn-primary {
    flex: 1;
    padding: 12px;
    background: var(--accent);
    border: none;
    border-radius: var(--radius-lg);
    color: white;
    font-family: var(--font-sans);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
}

.modal-btn-primary:hover { background: var(--accent-hover); }
.modal-btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }
.modal-btn-primary:active:not(:disabled) { transform: scale(0.97); }

.modal-btn-secondary {
    flex: 1;
    padding: 12px;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    color: var(--text-secondary);
    font-family: var(--font-sans);
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s;
}

.modal-btn-secondary:hover { background: var(--bg-card-hover); }
.modal-btn-secondary:active { transform: scale(0.97); }

/* Holding Search Results Dropdown */
.holding-search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-sheet);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-top: 4px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 10;
    box-shadow: var(--shadow-lg);
}

.holding-search-item {
    padding: 10px 14px;
    cursor: pointer;
    transition: background 0.1s;
    display: flex;
    align-items: center;
}

.holding-search-item:hover {
    background: var(--bg-card-hover);
}

.holding-search-item:not(:last-child) {
    border-bottom: 1px solid var(--border);
}

/* Expandable Holding Cards */
.holding-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    margin-bottom: 8px;
    overflow: hidden;
    transition: border-color 0.15s;
}

.holding-card.holding-expanded {
    border-color: var(--border-light);
}

.holding-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    cursor: pointer;
    transition: background 0.15s;
}

.holding-row:active {
    background: var(--bg-card-hover);
}

.holding-chevron {
    color: var(--text-dim);
    font-size: 1rem;
    margin-left: 8px;
    transition: transform 0.2s ease;
    flex-shrink: 0;
}

.chevron-open {
    transform: rotate(180deg);
}

.holding-detail {
    padding: 0 14px 14px;
    border-top: 1px solid var(--border);
}

.holding-detail-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    padding-top: 12px;
}

.holding-stat {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.holding-stat-label {
    font-size: 0.7rem;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.holding-stat-value {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
}

.holding-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

.holding-action-btn {
    flex: 1;
    padding: 8px 12px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: transparent;
    color: var(--accent);
    font-family: var(--font-sans);
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s;
    text-align: center;
}

.holding-action-btn:hover {
    background: var(--accent-bg);
}

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

.holding-action-remove {
    color: var(--loss);
    border-color: var(--loss-bg);
}

.holding-action-remove:hover {
    background: var(--loss-bg);
}

/* Earnings Calendar Chips */
.earnings-chip {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 12px 16px;
    min-width: 120px;
    flex-shrink: 0;
    text-align: center;
    transition: background 0.15s;
}

.earnings-chip:hover {
    background: var(--bg-card-hover);
}

.earnings-symbol {
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.earnings-date {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.earnings-time {
    font-size: 0.65rem;
    color: var(--accent);
    margin-top: 2px;
}

.earnings-est {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--text-dim);
    margin-top: 4px;
}

/* Insider Trading */
.insider-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border-bottom: 1px solid var(--border);
}

.insider-row:last-child { border-bottom: none; }

.insider-icon {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 700;
    flex-shrink: 0;
}

.insider-buy {
    background: var(--gain-bg);
    color: var(--gain);
}

.insider-sell {
    background: var(--loss-bg);
    color: var(--loss);
}

.insider-info {
    flex: 1;
    min-width: 0;
}

.insider-name {
    font-size: 0.85rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.insider-meta {
    font-size: 0.7rem;
    color: var(--text-dim);
}

.insider-right {
    text-align: right;
    flex-shrink: 0;
}

.insider-shares {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    font-weight: 600;
}

.insider-price {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--text-secondary);
}

.insider-date {
    font-size: 0.65rem;
    color: var(--text-dim);
}

/* Analyst Ratings Bar */
.analyst-bar-container {
    margin-bottom: 12px;
}

.analyst-bar {
    display: flex;
    height: 10px;
    border-radius: 5px;
    overflow: hidden;
    gap: 2px;
}

.analyst-segment {
    height: 100%;
    min-width: 4px;
    border-radius: 3px;
    transition: width 0.3s ease;
}

.analyst-strong-buy { background: #00c853; }
.analyst-buy { background: var(--gain); }
.analyst-hold { background: var(--warning); }
.analyst-sell-seg { background: var(--loss); }
.analyst-strong-sell { background: #b71c1c; }

.analyst-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.analyst-label {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.analyst-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* Peer Stocks */
.peer-scroll {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 4px 0;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.peer-scroll::-webkit-scrollbar { display: none; }

.peer-chip {
    padding: 8px 16px;
    border-radius: var(--radius);
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--accent);
    font-family: var(--font-mono);
    font-size: 0.8rem;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
    flex-shrink: 0;
}

.peer-chip:active {
    background: var(--bg-elevated);
    border-color: var(--accent);
}

/* Global Crypto Stats Grid */
.global-stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin-bottom: 16px;
}

.global-stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 12px;
}

.global-stat-label {
    font-size: 0.65rem;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-bottom: 4px;
}

.global-stat-value {
    font-family: var(--font-mono);
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
}

.global-stat-change {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    margin-top: 2px;
}

/* Trending Coin Chips */
.trending-coin-chip {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 12px 16px;
    min-width: 100px;
    flex-shrink: 0;
    text-align: center;
    transition: background 0.15s, transform 0.15s;
}

.trending-coin-chip:active {
    transform: scale(0.96);
    background: var(--bg-card-hover);
}

.trending-coin-img {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    margin: 0 auto 6px;
    display: block;
}

.trending-coin-symbol {
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--text-primary);
}

.trending-coin-name {
    font-size: 0.7rem;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100px;
}

/* Yield Rows */
.yield-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 6px;
}

.yield-info {
    flex: 1;
    min-width: 0;
}

.yield-symbol {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.yield-meta {
    font-size: 0.7rem;
    color: var(--text-dim);
    margin-top: 2px;
}

.yield-stable-badge {
    display: inline-block;
    padding: 1px 5px;
    border-radius: 4px;
    background: var(--gain-bg);
    color: var(--gain);
    font-size: 0.6rem;
    font-weight: 600;
    margin-left: 4px;
    vertical-align: middle;
}

.yield-stats {
    text-align: right;
    flex-shrink: 0;
    margin-left: 12px;
}

.yield-apy {
    font-family: var(--font-mono);
    font-size: 0.95rem;
    font-weight: 700;
}

.yield-tvl {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    margin-top: 2px;
}

/* Forex Grid */
.forex-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

@media (min-width: 480px) {
    .forex-grid { grid-template-columns: repeat(4, 1fr); }
}

.forex-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 10px;
    text-align: center;
}

.forex-currency {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-dim);
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.forex-rate {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
}

/* IPO Calendar Chips */
.ipo-chip {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 12px 16px;
    min-width: 130px;
    flex-shrink: 0;
    text-align: center;
    transition: background 0.15s;
}

.ipo-chip:hover {
    background: var(--bg-card-hover);
}

.ipo-symbol {
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--accent);
    margin-bottom: 2px;
}

.ipo-name {
    font-size: 0.7rem;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 120px;
    margin-bottom: 4px;
}

.ipo-date {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.ipo-price {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--gain);
    margin-top: 2px;
}

/* Market Movers */
.mover-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
    transition: background 0.15s;
}

.mover-row:last-child { border-bottom: none; }

.mover-row:active {
    background: var(--bg-card-hover);
    transform: scale(0.98);
}

.mover-info {
    flex: 1;
    min-width: 0;
}

.mover-symbol {
    font-family: var(--font-mono);
    font-weight: 600;
    font-size: 0.9rem;
}

.mover-name {
    font-size: 0.7rem;
    color: var(--text-dim);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
}

.mover-stats {
    text-align: right;
    flex-shrink: 0;
    margin-left: 12px;
}

.mover-price {
    font-size: 0.9rem;
    font-weight: 500;
}

.mover-change {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 600;
}
