/* ═══════════════════════════════════════
   Memecoin Screener — Dark Financial UI
   ═══════════════════════════════════════ */

:root {
    /* Color Palette */
    --bg-page: #050505;
    --bg-surface: #0a0a0a;
    --bg-surface-elevated: #111111;
    --bg-surface-hover: #171717;

    --text-primary: #ffffff;
    --text-secondary: #a3a3a3;
    --text-tertiary: #737373;

    --green: #10b981;
    --green-dim: rgba(16, 185, 129, 0.1);

    --orange: #f97316;
    --orange-dim: rgba(249, 115, 22, 0.1);

    --red: #ef4444;
    --red-dim: rgba(239, 68, 68, 0.1);

    --yellow: #eab308;
    --gold: #f59e0b;
    --purple-dim: rgba(168, 85, 247, 0.1);

    --border-light: #1f1f1f;
    --border-medium: #262626;

    /* Geometry */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;

    --spacing-section: 64px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--bg-page);
    color: var(--text-primary);
    font-size: 14px;
    line-height: 1.5;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* Base Icons */
.lucide { width: 18px; height: 18px; stroke-width: 2; }
.spin { animation: spin 1s linear infinite; }
@keyframes spin { 100% { transform: rotate(360deg); } }

/* ═══════════════════════════════════════
   Header
   ═══════════════════════════════════════ */
.app-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 20px 48px;
    background: rgba(5, 5, 5, 0.8);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-light);
    position: sticky; top: 0; z-index: 100;
}

.header-left .logo {
    display: flex; align-items: center; gap: 10px;
    font-weight: 800; font-size: 16px;
    letter-spacing: -0.5px;
    color: var(--text-primary);
}
.header-left .logo-icon { color: var(--green); stroke-width: 2.5; }
.header-left .logo span { color: var(--green); font-weight: 600; }

.header-center {
    position: absolute; left: 50%; transform: translateX(-50%);
}
.nav-capsule {
    display: flex; gap: 4px;
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-light);
    border-radius: 100px; padding: 4px;
}
.nav-btn {
    padding: 8px 24px; border-radius: 100px; border: none;
    background: transparent; color: var(--text-secondary);
    font-size: 13px; font-weight: 500; cursor: pointer;
    transition: all 0.2s ease;
}
.nav-btn:hover { color: var(--text-primary); }
.nav-btn.active {
    background: var(--border-light);
    color: var(--text-primary);
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.header-right {
    display: flex; align-items: center; gap: 16px;
}
.search-container { position: relative; }
.search-icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--text-tertiary); width: 16px; height: 16px; }
.search-box {
    padding: 10px 16px 10px 40px; border-radius: 100px;
    border: 1px solid var(--border-light); background: var(--bg-surface);
    color: var(--text-primary); width: 240px; font-size: 13px; outline: none;
    transition: all 0.2s ease;
}
.search-box:focus { border-color: var(--text-secondary); background: var(--bg-surface-elevated); width: 280px; }

.icon-btn {
    display: flex; align-items: center; justify-content: center;
    width: 40px; height: 40px; border-radius: 50%;
    background: var(--bg-surface); border: 1px solid var(--border-light);
    color: var(--text-secondary); cursor: pointer; transition: all 0.2s ease;
}
.icon-btn:hover { background: var(--bg-surface-hover); color: var(--text-primary); }

/* ═══════════════════════════════════════
   Main Layout & Page Header
   ═══════════════════════════════════════ */
.main-content {
    padding: 48px;
    max-width: 1600px;
    margin: 0 auto;
}

.page-header {
    margin-bottom: var(--spacing-section);
}
.page-header h1 {
    font-size: 48px; font-weight: 700;
    letter-spacing: -1.5px; margin-bottom: 12px;
    color: var(--text-primary);
}
.page-header p {
    font-size: 18px; color: var(--text-secondary);
    max-width: 600px; font-weight: 400;
}

/* ═══════════════════════════════════════
   KPI Section
   ═══════════════════════════════════════ */
.kpi-section {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin-bottom: var(--spacing-section);
}
.kpi-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 24px;
    display: flex; flex-direction: column;
}
.kpi-header {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 16px;
}
.kpi-label {
    font-size: 12px; font-weight: 600; text-transform: uppercase;
    letter-spacing: 1px; color: var(--text-tertiary);
}
.kpi-icon { color: var(--text-tertiary); width: 20px; height: 20px; }
.kpi-value {
    font-size: 36px; font-weight: 600;
    letter-spacing: -1px; color: var(--text-primary);
}
.kpi-sub {
    margin-top: 8px; font-size: 13px; color: var(--text-secondary);
}

/* ═══════════════════════════════════════
   Controls Section
   ═══════════════════════════════════════ */
.data-section { }
.section-header {
    margin-bottom: 24px;
}
.section-header h3 {
    font-size: 24px; font-weight: 600; letter-spacing: -0.5px;
    margin-bottom: 4px;
}
.section-header p {
    font-size: 14px; color: var(--text-secondary);
}

.controls-container {
    display: flex; gap: 32px;
    margin-bottom: 24px; flex-wrap: wrap;
}

.control-group {
    display: flex; flex-direction: column; gap: 8px;
}
.control-label {
    font-size: 11px; font-weight: 600; text-transform: uppercase;
    letter-spacing: 1px; color: var(--text-tertiary);
}
.control-row {
    display: flex; gap: 4px;
    background: var(--bg-surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md); padding: 4px;
}
.control-btn {
    padding: 6px 16px; border-radius: var(--radius-sm); border: none;
    background: transparent; color: var(--text-secondary);
    font-size: 13px; font-weight: 500; cursor: pointer; transition: all 0.15s ease;
}
.control-btn:hover { color: var(--text-primary); }
.control-btn.active {
    background: var(--border-light); color: var(--text-primary);
}

.behavior-dropdown {
    padding: 8px 16px; border-radius: var(--radius-md);
    border: 1px solid var(--border-light); background: var(--bg-surface);
    color: var(--text-primary); cursor: pointer; font-size: 13px;
    font-weight: 500; outline: none; appearance: none;
    min-width: 160px;
}
.behavior-dropdown:focus { border-color: var(--text-secondary); }

/* ═══════════════════════════════════════
   Table Surface
   ═══════════════════════════════════════ */
.table-container {
    background: var(--bg-surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-xl);
    overflow: auto;
    min-height: 400px;
}

table {
    width: 100%; min-width: 1200px; border-collapse: collapse;
}
thead th {
    position: sticky; top: 0; background: var(--bg-surface);
    padding: 20px 24px; text-align: right; font-weight: 500;
    font-size: 12px; color: var(--text-tertiary);
    border-bottom: 1px solid var(--border-light);
    white-space: nowrap; cursor: pointer; user-select: none;
    z-index: 10;
}
thead th:first-child { text-align: left; }
thead th:hover { color: var(--text-secondary); }
tbody tr {
    border-bottom: 1px solid var(--border-light);
    transition: background 0.15s ease; cursor: pointer;
}
tbody tr:hover { background: var(--bg-surface-hover); }
td {
    padding: 20px 24px; text-align: right;
    white-space: nowrap; font-variant-numeric: tabular-nums;
    font-size: 14px;
}
td:first-child { text-align: left; }

.empty-state {
    text-align: center; padding: 100px; color: var(--text-tertiary);
}
.empty-state .lucide {
    width: 32px; height: 32px; margin-bottom: 16px; opacity: 0.5;
}

/* Data Styles */
.price { color: var(--text-primary); font-weight: 500; }
.age { color: var(--text-secondary); }
.positive { color: var(--green); }
.negative { color: var(--red); }
.neutral { color: var(--text-tertiary); }
.pnl-positive { color: var(--green); font-weight: 500; }
.pnl-negative { color: var(--red); font-weight: 500; }

.pnl-big { padding: 4px 8px; border-radius: var(--radius-sm); font-weight: 600; font-size: 13px; }
.pnl-big.positive { background: var(--green-dim); color: var(--green); }
.pnl-big.negative { background: var(--red-dim); color: var(--red); }
.pnl-big.neutral { background: var(--bg-surface-elevated); color: var(--text-tertiary); }

/* Cells & Avatars */
.token-cell, .trader-cell { display: flex; align-items: center; gap: 16px; }
.token-rank, .trader-rank {
    font-size: 13px; font-weight: 500; min-width: 24px; text-align: center; color: var(--text-tertiary);
}
.trader-rank.gold { color: var(--gold); font-weight: 700; }
.trader-rank.silver { color: #d1d5db; font-weight: 700; }
.trader-rank.bronze { color: #b45309; font-weight: 700; }

.token-icon, .trader-avatar {
    width: 40px; height: 40px; border-radius: 50%;
    background: var(--bg-surface-elevated); border: 1px solid var(--border-medium);
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0; overflow: hidden;
}
.trader-avatar.top1 { background: rgba(245, 158, 11, 0.1); color: var(--gold); border-color: rgba(245, 158, 11, 0.3); }
.token-icon img { width: 100%; height: 100%; object-fit: cover; }

.token-info, .trader-info { display: flex; flex-direction: column; gap: 4px; }
.token-name, .trader-address {
    font-weight: 600; font-size: 15px; color: var(--text-primary);
}
.trader-address { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; }
.token-chain { font-size: 13px; color: var(--text-secondary); }

.trader-tags { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }

/* Tags & Badges */
.tag {
    padding: 2px 8px; border-radius: 4px; font-size: 11px;
    font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px;
    display: inline-flex; align-items: center; gap: 4px;
}
.tag-whale { background: rgba(59, 130, 246, 0.1); color: #60a5fa; border: 1px solid rgba(59, 130, 246, 0.2); }
.tag-bot { background: var(--purple-dim); color: #a78bfa; border: 1px solid rgba(167, 139, 250, 0.2); }
.tag-insider { background: rgba(234, 179, 8, 0.1); color: var(--yellow); border: 1px solid rgba(234, 179, 8, 0.2); }
.badge-amm { background: var(--green-dim); color: var(--green); padding: 2px 6px; border-radius: 4px; font-size: 10px; font-weight: 700; margin-left: 6px; }

/* Win Rate */
.winrate-container { display: flex; align-items: center; gap: 12px; justify-content: flex-end; }
.winrate-val { font-weight: 500; width: 44px; text-align: right; }
.winrate-bar { width: 64px; height: 6px; background: var(--bg-surface-elevated); border-radius: 3px; overflow: hidden; }
.winrate-fill { height: 100%; border-radius: 3px; transition: width .5s ease; }
.winrate-high { background: var(--green); }
.winrate-mid { background: var(--yellow); }
.winrate-low { background: var(--red); }

/* Investors Column */
.investors-cell { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; min-width: 90px; }
.inv-count { font-weight: 600; font-size: 15px; color: var(--text-primary); }
.inv-badges { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.inv-badge {
    display: inline-flex; align-items: center; gap: 2px;
    padding: 2px 6px; border-radius: 4px; font-size: 11px;
    font-weight: 600;
}
.inv-bar { width: 64px; height: 4px; background: rgba(167, 139, 250, 0.2); border-radius: 2px; overflow: hidden; }
.inv-bar-fill { height: 100%; border-radius: 2px; transition: width 0.5s ease; }
.inv-quality-high .inv-bar-fill { background: var(--green); }
.inv-quality-mid .inv-bar-fill { background: var(--yellow); }
.inv-quality-low .inv-bar-fill { background: var(--red); }

/* Classification Colors */
.inv-elite { background: var(--green-dim); color: var(--green); border: 1px solid rgba(16, 185, 129, 0.2); }
.inv-profitable { background: rgba(59, 130, 246, 0.1); color: #60a5fa; border: 1px solid rgba(59, 130, 246, 0.2); }
.inv-regular { background: var(--bg-surface-elevated); color: var(--text-primary); border: 1px solid var(--border-medium); }
.inv-bot-profit { background: rgba(234, 179, 8, 0.1); color: var(--yellow); border: 1px solid rgba(234, 179, 8, 0.2); }
.inv-bot { background: var(--purple-dim); color: #a78bfa; border: 1px solid rgba(167, 139, 250, 0.2); }
.inv-losing { background: var(--red-dim); color: var(--red); border: 1px solid rgba(239, 68, 68, 0.2); }

.inv-score { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 16px; padding: 0 4px; border-radius: 8px; font-size: 10px; font-weight: 700; background: var(--bg-surface-elevated); border: 1px solid currentColor; margin-left: 6px; }
.inv-score-cell { font-weight: 600; font-size: 13px; padding: 4px 8px; border-radius: var(--radius-sm); display: inline-block; }
.inv-score-high { background: var(--green-dim); color: var(--green); }
.inv-score-mid { background: rgba(234, 179, 8, 0.1); color: var(--yellow); }
.inv-score-low { background: var(--red-dim); color: var(--red); }

/* Apply badge styles directly to tags */
.tag.inv-elite { background: var(--green-dim); color: var(--green); border: 1px solid rgba(16, 185, 129, 0.2); }
.tag.inv-profitable { background: rgba(59, 130, 246, 0.1); color: #60a5fa; border: 1px solid rgba(59, 130, 246, 0.2); }
.tag.inv-regular { background: var(--bg-surface-elevated); color: var(--text-primary); border: 1px solid var(--border-medium); }
.tag.inv-bot-profit { background: rgba(234, 179, 8, 0.1); color: var(--yellow); border: 1px solid rgba(234, 179, 8, 0.2); }
.tag.inv-bot { background: var(--purple-dim); color: #a78bfa; border: 1px solid rgba(167, 139, 250, 0.2); }
.tag.inv-losing { background: var(--red-dim); color: var(--red); border: 1px solid rgba(239, 68, 68, 0.2); }

/* ═══════════════════════════════════════
   Drawer (Investor Guide)
   ═══════════════════════════════════════ */
.drawer-overlay {
    position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
    background: rgba(0,0,0,0.6); backdrop-filter: blur(4px);
    z-index: 999; opacity: 0; pointer-events: none;
    transition: opacity 0.3s ease;
}
.drawer-overlay.active { opacity: 1; pointer-events: auto; }

.drawer {
    position: fixed; top: 0; right: 0; width: 400px; max-width: 100vw; height: 100vh;
    background: var(--bg-surface); border-left: 1px solid var(--border-light);
    z-index: 1000; transform: translateX(100%);
    display: flex; flex-direction: column;
}
.drawer-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 24px 32px; border-bottom: 1px solid var(--border-light);
}
.drawer-header h2 { font-size: 20px; font-weight: 600; letter-spacing: -0.5px; }
.close-drawer {
    background: transparent; border: none; color: var(--text-secondary);
    cursor: pointer; display: flex; padding: 4px;
}
.close-drawer:hover { color: var(--text-primary); }

.drawer-content {
    padding: 32px; overflow-y: auto; flex: 1;
}
.guide-divider { height: 1px; background: var(--border-light); margin: 32px 0; }
.guide-title {
    font-size: 11px; font-weight: 600; text-transform: uppercase;
    letter-spacing: 1px; color: var(--text-tertiary); margin-bottom: 16px;
}
.guide-items { display: flex; flex-direction: column; gap: 20px; }
.guide-item { display: flex; align-items: flex-start; gap: 16px; }
.guide-label { font-size: 13px; color: var(--text-secondary); line-height: 1.5; }
.guide-label strong { color: var(--text-primary); font-weight: 600; font-size: 14px; }


/* Logout */
.guide-account-section {
    padding-bottom: 8px;
}

.logout-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 16px;
    background: var(--red-dim);
    color: var(--red);
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: 8px;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.logout-btn:hover {
    background: rgba(239, 68, 68, 0.16);
    border-color: rgba(239, 68, 68, 0.35);
}

.logout-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.logout-btn svg {
    width: 16px;
    height: 16px;
}

/* ═══════════════════════════════════════
   Status Bar
   ═══════════════════════════════════════ */
.status-bar {
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px 48px; background: var(--bg-surface);
    border-top: 1px solid var(--border-light); font-size: 12px; color: var(--text-tertiary);
}
.status-dot {
    display: inline-block; width: 8px; height: 8px;
    border-radius: 50%; background: var(--yellow); margin-right: 8px;
    box-shadow: 0 0 8px var(--yellow);
}
.status-dot.connected { background: var(--green); box-shadow: 0 0 8px rgba(16, 185, 129, 0.5); }
.status-dot.error { background: var(--red); box-shadow: 0 0 8px rgba(239, 68, 68, 0.5); }

/* Scrollbar */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--bg-page); }
::-webkit-scrollbar-thumb { background: var(--border-medium); border-radius: 4px; border: 2px solid var(--bg-page); }
::-webkit-scrollbar-thumb:hover { background: var(--text-tertiary); }

/* Responsive */
@media (max-width: 1200px) {
    .kpi-section { grid-template-columns: repeat(2, 1fr); }
    .main-content { padding: 32px; }
    .app-header { padding: 16px 32px; }
}
@media (max-width: 768px) {
    .app-header { flex-direction: column; gap: 16px; padding: 16px; }
    .header-center { position: static; transform: none; }
    .kpi-section { grid-template-columns: 1fr; }
    .main-content { padding: 16px; }
    td, th { padding: 16px; }
    .controls-container { flex-direction: column; gap: 16px; }
}

/* ==========================================================================
   LIVE WALLET PANEL
   ========================================================================== */

.wallet-panel-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.wallet-panel-overlay.active {
    opacity: 1;
    visibility: visible;
}

.wallet-panel {
    position: absolute;
    top: 0;
    right: 0;
    width: min(520px, 92vw);
    height: 100%;
    background: #0d0f12;
    border-left: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: -20px 0 60px rgba(0, 0, 0, 0.45);
    transform: translateX(100%);
    transition: transform 0.28s ease;
    overflow-y: auto;
}

.wallet-panel-overlay.active .wallet-panel {
    transform: translateX(0);
}

.wallet-panel-header {
    position: sticky;
    top: 0;
    z-index: 2;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 24px;
    background: rgba(13, 15, 18, 0.96);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.wallet-panel-eyebrow {
    display: block;
    margin-bottom: 7px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.14em;
    color: #8b8f98;
}

.wallet-panel-header h2 {
    margin: 0;
    max-width: 390px;
    font-size: 16px;
    font-weight: 600;
    color: #f5f5f5;
    word-break: break-all;
}

.wallet-panel-close {
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 9px;
    background: rgba(255, 255, 255, 0.04);
    color: #fff;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
}

.wallet-panel-close:hover {
    background: rgba(255, 255, 255, 0.09);
}

.wallet-panel-content {
    padding: 24px;
}

.wallet-panel-loading {
    padding: 40px 0;
    text-align: center;
    color: #8b8f98;
}

body.wallet-panel-open {
    overflow: hidden;
}

#tableBody tr {
    cursor: pointer;
}

@media (max-width: 600px) {
    .wallet-panel {
        width: 100%;
    }

    .wallet-panel-header,
    .wallet-panel-content {
        padding: 18px;
    }
}


.wallet-summary {
    padding: 18px;
    margin-bottom: 24px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.025);
}

.wallet-summary-label {
    margin-bottom: 6px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #8b8f98;
}

.wallet-summary-address {
    margin-bottom: 12px;
    font-family: monospace;
    font-size: 15px;
    color: #f5f5f5;
}

.wallet-solscan-link {
    font-size: 13px;
    text-decoration: none;
}

.wallet-panel-section {
    margin-top: 26px;
}

.wallet-section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.wallet-section-heading h3 {
    margin: 0;
    font-size: 14px;
}

.wallet-section-heading span {
    font-size: 12px;
    color: #8b8f98;
}

.wallet-position-item,
.wallet-tx-item {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.wallet-position-item span,
.wallet-tx-item span {
    font-size: 13px;
}

.wallet-tx-item > div {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.wallet-tx-item > div:last-child {
    text-align: right;
}

.wallet-tx-item small {
    font-size: 11px;
    color: #747982;
}

.wallet-empty {
    padding: 20px 0;
    font-size: 13px;
    color: #747982;
}

/* ==========================================================================
   WALLET ALERTS
   ========================================================================== */

   .notification-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

/* Notification bell */
.notification-wrapper .icon-btn {
    position: relative;
}

.notification-badge {
    position: absolute;
    top: -5px;
    right: -5px;

    min-width: 18px;
    height: 18px;
    padding: 0 5px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 999px;

    background: var(--red);
    color: #ffffff;

    font-size: 10px;
    font-weight: 700;
    line-height: 1;

    border: 2px solid var(--bg-page);

    pointer-events: none;
}

.notification-badge.hidden {
    display: none;
}

/* Dropdown panel */
.notification-panel {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;

    width: min(920px, calc(100vw - 48px));
    max-width: none;

    background: var(--bg-surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);

    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);

    overflow: hidden;
    z-index: 1000;
}

.notification-panel.hidden {
    display: none;
}

/* Header */
.notification-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;

    padding: 16px 18px;

    border-bottom: 1px solid var(--border-light);
}

.notification-panel-title {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.notification-panel-title strong {
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 600;
}

.notification-panel-title span {
    color: var(--text-tertiary);
    font-size: 11px;
}

/* Clear alerts */
.notification-clear-btn {
    padding: 6px 10px;

    background: transparent;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);

    color: var(--text-secondary);

    font-family: inherit;
    font-size: 11px;
    font-weight: 500;

    cursor: pointer;
    transition: all 0.15s ease;
}

.notification-clear-btn:hover {
    background: var(--bg-surface-hover);
    color: var(--text-primary);
}

/* Alerts container */
.notification-list {
    max-height: 420px;
    overflow-y: auto;
}

/* Individual alert */
.notification-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;

    padding: 14px 18px;

    border-bottom: 1px solid var(--border-light);

    cursor: pointer;
    transition: background 0.15s ease;
}

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

.notification-item:hover {
    background: var(--bg-surface-hover);
}

/* BUY / SELL indicator */
.notification-indicator {
    width: 8px;
    height: 8px;

    margin-top: 6px;

    flex: 0 0 8px;

    border-radius: 50%;
}

.notification-indicator.buy {
    background: var(--green);
    box-shadow: 0 0 8px rgba(16, 185, 129, 0.45);
}

.notification-indicator.sell {
    background: var(--red);
    box-shadow: 0 0 8px rgba(239, 68, 68, 0.45);
}

/* Alert content */
.notification-content {
    flex: 1;
    min-width: 0;
}

.notification-main {
    display: flex;
    justify-content: space-between;
    gap: 12px;

    margin-bottom: 5px;
}

.notification-wallet-row,
.notification-token-row {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.notification-wallet-row {
    flex: 1;
}

.notification-token-row {
    flex: 1;
}

.notification-wallet-row .notification-wallet,
.notification-token-row .notification-token-address {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.notification-copy-btn {
    flex-shrink: 0;

    padding: 4px 8px;

    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);

    background: transparent;
    color: var(--text-tertiary);

    font-family: inherit;
    font-size: 10px;
    font-weight: 600;

    cursor: pointer;

    transition:
        background 0.15s ease,
        color 0.15s ease,
        border-color 0.15s ease;
}

.notification-copy-btn:hover {
    background: var(--bg-surface-hover);
    color: var(--text-primary);
    border-color: var(--border-medium);
}

.notification-copy-btn:active {
    transform: translateY(1px);
}

.notification-type {
    flex-shrink: 0;

    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}

.notification-type.buy {
    color: var(--green);
}

.notification-type.sell {
    color: var(--red);
}

.notification-time {
    flex-shrink: 0;
    color: var(--text-tertiary);
    white-space: nowrap;
}

.notification-time {
    flex-shrink: 0;
    color: var(--text-tertiary);
}

/* Empty state */
.notification-empty {
    padding: 32px 20px;

    text-align: center;

    color: var(--text-tertiary);
    font-size: 13px;
}

/* Mobile */
@media (max-width: 600px) {
    .notification-panel {
        position: fixed;

        top: 76px;
        left: 16px;
        right: 16px;

        width: auto;
        max-width: none;
    }

    .notification-list {
        max-height: 60vh;
    }
}
/* ============================================================================
   Wallet Alerts - Live Toast Notifications
   ============================================================================ */

.wallet-alerts-container {
    position: fixed;
    top: 88px;
    right: 24px;

    width: 360px;
    max-width: calc(100vw - 32px);

    display: flex;
    flex-direction: column;
    gap: 10px;

    z-index: 1500;

    pointer-events: none;
}

.wallet-alert-toast {
    width: 100%;

    padding: 14px 16px;

    background: var(--bg-surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);

    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);

    pointer-events: auto;

    animation: walletAlertEnter 0.25s ease-out;
}

.wallet-alert-toast.buy {
    border-left: 3px solid var(--green);
}

.wallet-alert-toast.sell {
    border-left: 3px solid var(--red);
}

.wallet-alert-toast.leaving {
    animation: walletAlertLeave 0.22s ease-in forwards;
}

.wallet-alert-toast-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;

    margin-bottom: 8px;

    color: var(--text-primary);

    font-size: 12px;
    font-weight: 600;
}

.wallet-alert-toast-title .buy {
    color: var(--green);
}

.wallet-alert-toast-title .sell {
    color: var(--red);
}

.wallet-alert-toast-token {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;

    margin-bottom: 6px;

    color: #60a5fa;

    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 12px;
}

.wallet-alert-toast-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;

    color: var(--text-secondary);
    font-size: 11px;
}

@keyframes walletAlertEnter {
    from {
        opacity: 0;
        transform: translateX(24px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes walletAlertLeave {
    from {
        opacity: 1;
        transform: translateX(0);
    }

    to {
        opacity: 0;
        transform: translateX(24px);
    }
}

@media (max-width: 600px) {
    .wallet-alerts-container {
        top: 82px;
        left: 16px;
        right: 16px;

        width: auto;
        max-width: none;
    }
}

/* ============================================================
   WALLET TRACK ACTIONS
   ============================================================ */

.wallet-summary-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.wallet-track-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 7px 14px;

    border: 1px solid #10b981;
    border-radius: 8px;

    background: rgba(16, 185, 129, 0.10);
    color: #10b981;

    font-family: inherit;
    font-size: 13px;
    font-weight: 600;

    cursor: pointer;
    transition:
        background 0.2s ease,
        border-color 0.2s ease,
        color 0.2s ease,
        opacity 0.2s ease;
}

.wallet-track-btn:hover:not(:disabled) {
    background: rgba(59, 130, 246, 0.20);
}

.wallet-track-btn:disabled {
    cursor: default;
    opacity: 0.75;
}

.wallet-track-btn.tracked {
    background: rgba(16, 185, 129, 0.16);
    border-color: #10b981;
    color: #10b981;
}

/* MetaMask / My Wallet */
.wallet-connect-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 13px;
    border-radius: 10px;
    border: 1px solid var(--border, #2a2a2a);
    background: transparent;
    color: inherit;
    cursor: pointer;
    white-space: nowrap;
}

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

.wallet-connect-btn.connected {
    border-color: rgba(34, 197, 94, 0.5);
}

.wallet-connect-btn svg {
    width: 17px;
    height: 17px;
}


/* ==========================================================================
   Wallet Alerts - aligned copy controls
   ========================================================================== */

.notification-item {
    display: grid;
    grid-template-columns: 10px minmax(0, 1fr);
    gap: 12px;
    align-items: start;
    padding: 14px 16px;
}

.notification-content {
    min-width: 0;
}

.notification-main {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.notification-wallet-row,
.notification-token-row {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.notification-wallet,
.notification-token-address {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.notification-details {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 14px;
    color: var(--text-secondary);
    font-size: 12px;
}

.notification-amount,
.notification-time {
    white-space: nowrap;
}

.notification-time {
    color: var(--text-tertiary);
}

.notification-copy-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 26px;
    height: 26px;
    padding: 0;
    border: 1px solid var(--border-light);
    border-radius: 7px;
    background: transparent;
    color: var(--text-tertiary);
    cursor: pointer;
    transition:
        background 0.15s ease,
        color 0.15s ease,
        border-color 0.15s ease,
        transform 0.15s ease;
}

.notification-copy-btn:hover {
    background: var(--bg-surface-hover);
    color: var(--text-primary);
    border-color: var(--border-medium);
}

.notification-copy-btn:active {
    transform: scale(0.96);
}

.notification-copy-btn svg {
    width: 14px;
    height: 14px;
    stroke-width: 2;
}

.notification-copy-btn.copied {
    color: var(--green);
    border-color: var(--green);
}

.notification-type {
    justify-self: end;
}

/* ==========================================================================
   Wallet Alerts - Two Column Layout
   ========================================================================== */

.wallet-alerts-layout {
    display: grid;
    grid-template-columns: 270px minmax(0, 1fr);
    min-height: 420px;
    max-height: 560px;
}

.wallet-alerts-sidebar {
    min-width: 0;
    border-right: 1px solid var(--border-light);
    background: rgba(255, 255, 255, 0.015);
}

.wallet-alerts-sidebar-header,
.wallet-alerts-activity-header {
    display: flex;
    align-items: center;
    min-height: 48px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-light);
}

.wallet-alerts-sidebar-header span,
.wallet-alerts-activity-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-tertiary);
}

.wallet-alerts-wallet-list {
    max-height: 510px;
    overflow-y: auto;
}

.wallet-alerts-activity {
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.wallet-alerts-activity-header {
    justify-content: space-between;
}

.wallet-alerts-activity-header > div {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.wallet-alerts-selected-wallet {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;

    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 12px;
    color: var(--text-secondary);
}

.wallet-alerts-activity .notification-list {
    flex: 1;
    max-height: 510px;
    overflow-y: auto;
}

@media (max-width: 760px) {
    .wallet-alerts-layout {
        grid-template-columns: 1fr;
        max-height: 70vh;
    }

    .wallet-alerts-sidebar {
        border-right: none;
        border-bottom: 1px solid var(--border-light);
    }

    .wallet-alerts-wallet-list {
        max-height: 180px;
    }

    .wallet-alerts-activity .notification-list {
        max-height: 360px;
    }
}

/* ==========================================================================
   Wallet Alerts - Wallet Selector
   ========================================================================== */

.wallet-alert-wallet-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 72px;
    align-items: center;
    gap: 8px;

    padding: 6px 10px;

    border-bottom: 1px solid var(--border-light);

    transition: background 0.15s ease;
}

.wallet-alert-wallet-item:hover {
    background: var(--bg-surface-hover);
}

.wallet-alert-wallet-item.active {
    background: var(--green-dim);
}

.wallet-alert-select {
    min-width: 0;

    display: flex;
    align-items: center;
    gap: 10px;

    padding: 10px 8px;

    border: none;
    background: transparent;
    color: inherit;

    font-family: inherit;
    text-align: left;

    cursor: pointer;
}

.wallet-alert-select-indicator {
    width: 8px;
    height: 8px;

    flex: 0 0 8px;

    border-radius: 50%;

    background: var(--border-medium);

    transition:
        background 0.15s ease,
        box-shadow 0.15s ease;
}

.wallet-alert-wallet-item.active .wallet-alert-select-indicator {
    background: var(--green);
    box-shadow: 0 0 8px rgba(16, 185, 129, 0.45);
}

.wallet-alert-select-info {
    min-width: 0;

    display: flex;
    flex-direction: column;
    gap: 3px;
}

.wallet-alert-select-address {
    min-width: 0;

    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;

    color: var(--text-primary);

    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 12px;
    font-weight: 600;
}

.wallet-alert-select-count {
    color: var(--text-tertiary);
    font-size: 10px;
}

.wallet-alert-wallet-item.active .wallet-alert-select-address {
    color: var(--green);
}

.wallet-alert-sidebar-copy {
    justify-self: center;
}

/* Wallet Alerts - Add wallet button */

.wallet-alerts-sidebar-header {
    justify-content: space-between;
    gap: 10px;
}

.wallet-alerts-add-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;

    padding: 6px 9px;

    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);

    background: transparent;
    color: var(--text-secondary);

    font-family: inherit;
    font-size: 10px;
    font-weight: 600;

    cursor: pointer;

    transition:
        background 0.15s ease,
        color 0.15s ease,
        border-color 0.15s ease;
}

.wallet-alerts-add-btn:hover {
    background: var(--bg-surface-hover);
    color: var(--text-primary);
    border-color: var(--border-medium);
}

.wallet-alerts-add-btn svg {
    width: 13px;
    height: 13px;
}

/* ==========================================================================
   Wallet Alerts - Available Wallet Picker
   ========================================================================== */

.wallet-alerts-add-btn.active {
    background: var(--green-dim);
    border-color: rgba(16, 185, 129, 0.35);
    color: var(--green);
}

.wallet-alerts-picker {
    padding: 10px;
    border-bottom: 1px solid var(--border-light);
    background: var(--bg-surface);
}

.wallet-alerts-picker-search {
    display: flex;
    align-items: center;
    gap: 8px;

    height: 36px;
    padding: 0 10px;

    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);

    background: var(--bg-page);
}

.wallet-alerts-picker-search svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    color: var(--text-tertiary);
}

.wallet-alerts-picker-search input {
    width: 100%;
    min-width: 0;

    border: none;
    outline: none;

    background: transparent;
    color: var(--text-primary);

    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 11px;
}

.wallet-alerts-picker-search input::placeholder {
    color: var(--text-tertiary);
}

.wallet-alerts-picker-list {
    max-height: 260px;
    margin-top: 8px;
    overflow-y: auto;
}

.wallet-alerts-picker-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;

    padding: 9px 6px;

    background: rgba(59, 130, 246, 0.14);
    border-bottom: 1px solid rgba(59, 130, 246, 0.28);

    transition: background 0.15s ease;
}

.wallet-alerts-picker-item:hover {
    background: rgba(59, 130, 246, 0.22);
}

.wallet-alerts-picker-item:last-child {
    border-bottom: none;
}

.wallet-alerts-picker-info {
    min-width: 0;

    display: flex;
    flex-direction: column;
    gap: 2px;
}

.wallet-alerts-picker-address {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;

    color: #60a5fa;

    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 11px;
    font-weight: 600;
}

.wallet-alerts-picker-meta {
    color: var(--text-tertiary);
    font-size: 10px;
}

.wallet-alerts-picker-add {
    padding: 5px 9px;

    border: 1px solid rgba(59, 130, 246, 0.35);
    border-radius: var(--radius-sm);

    background: rgba(59, 130, 246, 0.12);
    color: #60a5fa;

    font-family: inherit;
    font-size: 10px;
    font-weight: 600;

    cursor: pointer;
}

.wallet-alerts-picker-add:hover {
    background: rgba(16, 185, 129, 0.18);
}

.wallet-alerts-picker-add:disabled {
    opacity: 0.6;
    cursor: wait;
}

/* Wallet Alerts - Expanded panel */

.notification-panel {
    width: min(1320px, calc(100vw - 48px));
    max-width: 1320px;
}

.wallet-alerts-layout {
    grid-template-columns: 430px minmax(0, 1fr);
    min-height: 500px;
    max-height: 650px;
}

.wallet-alerts-wallet-list,
.wallet-alerts-activity .notification-list {
    max-height: 600px;
}

.notification-panel-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.notification-panel-close {
    width: 30px;
    height: 30px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 0;

    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);

    background: transparent;
    color: var(--text-secondary);

    cursor: pointer;

    transition:
        background 0.15s ease,
        color 0.15s ease,
        border-color 0.15s ease;
}

.notification-panel-close:hover {
    background: var(--bg-surface-hover);
    color: var(--text-primary);
    border-color: var(--border-medium);
}

.notification-panel-close svg {
    width: 15px;
    height: 15px;
}

.wallet-alerts-picker-header {
    display: flex;
    align-items: center;
    justify-content: space-between;

    margin-bottom: 8px;
}

.wallet-alerts-picker-header > span {
    color: var(--text-secondary);
    font-size: 11px;
    font-weight: 600;
}

.wallet-alerts-picker-close {
    width: 26px;
    height: 26px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 0;

    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);

    background: transparent;
    color: var(--text-tertiary);

    cursor: pointer;
}

.wallet-alerts-picker-close:hover {
    background: var(--bg-surface-hover);
    color: var(--text-primary);
}

.wallet-alerts-picker-close svg {
    width: 13px;
    height: 13px;
}

/* ==========================================================================
   Wallet Alerts - Tabs
   ========================================================================== */

.wallet-alerts-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;

    padding: 10px 12px;

    border-bottom: 1px solid var(--border-light);
    background: var(--bg-surface);
}

.wallet-alerts-tab {
    min-width: 0;

    padding: 9px 12px;

    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);

    background: transparent;
    color: var(--text-secondary);

    font-family: inherit;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;

    cursor: pointer;

    transition:
        background 0.15s ease,
        border-color 0.15s ease,
        color 0.15s ease,
        box-shadow 0.15s ease;
}

.wallet-alerts-tab:hover {
    background: var(--bg-surface-hover);
    color: var(--text-primary);
}

#walletAlertsTrackedTab.active {
    background: rgba(16, 185, 129, 0.12);
    border-color: rgba(16, 185, 129, 0.35);
    color: var(--green);
    box-shadow: inset 0 -2px 0 rgba(16, 185, 129, 0.65);
}

#walletAlertsAvailableTab.active {
    background: rgba(59, 130, 246, 0.12);
    border-color: rgba(59, 130, 246, 0.35);
    color: #60a5fa;
    box-shadow: inset 0 -2px 0 rgba(59, 130, 246, 0.65);
}

.wallet-alerts-tab-content {
    min-height: 500px;
}

.wallet-alerts-tab-panel[hidden] {
    display: none !important;
}

.wallet-alerts-tab-panel.active {
    display: block;
}

/* Available wallets section */
#walletAlertsAvailablePanel .wallet-alerts-sidebar {
    background: rgba(59, 130, 246, 0.025);
}

#walletAlertsAvailablePanel .wallet-alerts-sidebar-header span {
    color: #60a5fa;
}

#walletAlertsAvailablePanel .wallet-alerts-picker-search {
    margin: 10px 10px 0;
}

#walletAlertsAvailablePanel .wallet-alerts-picker-list {
    max-height: 520px;
    margin: 8px 10px 0;
}

/* Keep Add action consistently blue */
.wallet-alerts-picker-add:hover {
    background: rgba(59, 130, 246, 0.20);
}

@media (max-width: 760px) {
    .wallet-alerts-tabs {
        grid-template-columns: 1fr;
    }

    .wallet-alerts-tab-content {
        min-height: auto;
    }
}

/* Available wallet selection */
.wallet-alerts-available-select {
    min-width: 0;

    display: flex;
    align-items: center;
    gap: 10px;

    padding: 9px 6px;

    border: none;
    background: transparent;
    color: inherit;

    font-family: inherit;
    text-align: left;

    cursor: pointer;
}

.wallet-alerts-available-indicator {
    width: 8px;
    height: 8px;

    flex: 0 0 8px;

    border-radius: 50%;
    background: rgba(96, 165, 250, 0.4);
}

.wallet-alerts-picker-item.active {
    background: rgba(59, 130, 246, 0.22);
}

.wallet-alerts-picker-item.active
.wallet-alerts-available-indicator {
    background: #60a5fa;
    box-shadow: 0 0 8px rgba(59, 130, 246, 0.5);
}


/* Wallet management feedback */
.wallet-alerts-status {
    position: absolute;
    right: 18px;
    bottom: 18px;
    z-index: 30;

    padding: 8px 12px;

    border-radius: var(--radius-sm);
    border: 1px solid rgba(16, 185, 129, 0.35);

    background: rgba(16, 185, 129, 0.14);
    color: var(--green);

    font-size: 11px;
    font-weight: 600;

    backdrop-filter: blur(8px);

    transition:
        opacity 0.2s ease,
        transform 0.2s ease;
}

.wallet-alerts-status.leaving {
    opacity: 0;
    transform: translateY(4px);
}

/* ==========================================================================
   Wallet Alerts - Profitable Wallets
   ========================================================================== */

.wallet-alerts-tabs {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

#walletAlertsProfitableTab.active {
    background: rgba(245, 158, 11, 0.12);
    border-color: rgba(245, 158, 11, 0.35);
    color: #fbbf24;
    box-shadow: inset 0 -2px 0 rgba(245, 158, 11, 0.7);
}

#walletAlertsProfitablePanel .wallet-alerts-sidebar {
    background: rgba(245, 158, 11, 0.025);
}

#walletAlertsProfitablePanel .wallet-alerts-sidebar-header span {
    color: #fbbf24;
}

#walletAlertsProfitablePanel .wallet-alerts-picker-search {
    margin: 10px 10px 0;
}

#walletAlertsProfitablePanel .wallet-alerts-picker-list {
    max-height: 520px;
    margin: 8px 10px 0;
}

.wallet-alerts-profitable-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;

    padding: 9px 6px;

    background: rgba(245, 158, 11, 0.08);
    border-bottom: 1px solid rgba(245, 158, 11, 0.18);

    transition: background 0.15s ease;
}

.wallet-alerts-profitable-item:hover {
    background: rgba(245, 158, 11, 0.14);
}

.wallet-alerts-profitable-item.active {
    background: rgba(245, 158, 11, 0.20);
}

.wallet-alerts-profitable-select {
    min-width: 0;

    display: flex;
    align-items: center;
    gap: 10px;

    padding: 9px 6px;

    border: none;
    background: transparent;
    color: inherit;

    font-family: inherit;
    text-align: left;

    cursor: pointer;
}

.wallet-alerts-profitable-indicator {
    width: 8px;
    height: 8px;
    flex: 0 0 8px;

    border-radius: 50%;
    background: rgba(251, 191, 36, 0.45);
}

.wallet-alerts-profitable-item.active
.wallet-alerts-profitable-indicator {
    background: #fbbf24;
    box-shadow: 0 0 8px rgba(245, 158, 11, 0.5);
}

.wallet-alerts-profitable-info {
    min-width: 0;

    display: flex;
    flex-direction: column;
    gap: 3px;
}

.wallet-alerts-profitable-address {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;

    color: #fbbf24;

    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 11px;
    font-weight: 600;
}

.wallet-alerts-profitable-pnl {
    color: var(--green);
    font-size: 10px;
    font-weight: 600;
}

.wallet-alerts-profitable-tracked {
    padding: 5px 9px;

    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: var(--radius-sm);

    background: rgba(16, 185, 129, 0.10);
    color: var(--green);

    font-size: 10px;
    font-weight: 600;
}


/* Profitable Wallets - filters */
.wallet-alerts-profitable-filters {
    margin: 10px 10px 0;
    padding: 10px;

    display: flex;
    flex-direction: column;
    gap: 10px;

    border: 1px solid rgba(245, 158, 11, 0.16);
    border-radius: var(--radius-sm);
    background: rgba(245, 158, 11, 0.035);
}

.wallet-alerts-profitable-filter-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.wallet-alerts-profitable-filter-label {
    color: var(--text-secondary);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.wallet-alerts-profitable-time-filters {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 4px;
}

.wallet-alerts-profitable-time-filters button {
    min-width: 0;
    padding: 6px 2px;

    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);

    background: var(--bg-surface);
    color: var(--text-secondary);

    font-family: inherit;
    font-size: 9px;
    font-weight: 600;

    cursor: pointer;

    transition:
        background 0.15s ease,
        border-color 0.15s ease,
        color 0.15s ease;
}

.wallet-alerts-profitable-time-filters button:hover {
    border-color: rgba(245, 158, 11, 0.38);
    color: #fbbf24;
}

.wallet-alerts-profitable-time-filters button.active {
    border-color: rgba(245, 158, 11, 0.55);
    background: rgba(245, 158, 11, 0.14);
    color: #fbbf24;
}

.wallet-alerts-profitable-pnl-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 6px;
}

.wallet-alerts-profitable-pnl-row input {
    min-width: 0;
    width: 100%;
    padding: 7px 9px;

    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    outline: none;

    background: var(--bg-surface);
    color: var(--text-primary);

    font-family: inherit;
    font-size: 11px;
}

.wallet-alerts-profitable-pnl-row input:focus {
    border-color: rgba(245, 158, 11, 0.55);
}

.wallet-alerts-profitable-pnl-row button {
    padding: 7px 11px;

    border: 1px solid rgba(245, 158, 11, 0.35);
    border-radius: var(--radius-sm);

    background: rgba(245, 158, 11, 0.10);
    color: #fbbf24;

    font-family: inherit;
    font-size: 10px;
    font-weight: 700;

    cursor: pointer;

    transition:
        background 0.15s ease,
        border-color 0.15s ease;
}

.wallet-alerts-profitable-pnl-row button:hover {
    background: rgba(245, 158, 11, 0.18);
    border-color: rgba(245, 158, 11, 0.55);
}

.wallet-alerts-profitable-meta {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;

    color: var(--text-secondary);
    font-size: 9px;
    line-height: 1.35;
}

@media (max-width: 760px) {
    .wallet-alerts-tabs {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   Wallet Alerts - Compact new-alert summary
   ========================================================================== */

.wallet-alert-toast-summary {
    display: inline-flex;
    align-items: center;

    padding: 8px 12px;

    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);

    background: rgba(17, 24, 39, 0.94);
    color: var(--text-secondary);

    font-size: 11px;
    font-weight: 600;

    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.24);
    backdrop-filter: blur(10px);

    transition:
        opacity 0.2s ease,
        transform 0.2s ease;
}

.wallet-alert-toast-summary.leaving {
    opacity: 0;
    transform: translateY(4px);
}

.wallet-alert-sidebar-actions {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.wallet-alert-remove-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    padding: 0;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    transition:
        background 0.18s ease,
        border-color 0.18s ease,
        color 0.18s ease,
        opacity 0.18s ease;
}

.wallet-alert-remove-btn:hover {
    background: rgba(239, 68, 68, 0.10);
    border-color: rgba(239, 68, 68, 0.35);
    color: #ef4444;
}

.wallet-alert-remove-btn:disabled {
    cursor: wait;
    opacity: 0.45;
}

.wallet-alert-remove-btn svg {
    width: 14px;
    height: 14px;
}

.wallet-alert-sidebar-actions {
    width: 72px;
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
}

/* ==========================================================================
   Wallet Alerts - Collapsible Toast Stack
   ========================================================================== */

.wallet-alert-toast[hidden],
.wallet-alert-toast-summary[hidden] {
display: none !important;
}

.wallet-alerts-container.expanded {
       max-height: min(70vh, 600px);
       overflow-y: auto;
       overscroll-behavior: contain;
       padding-bottom: 4px;
       pointer-events: auto;
   }

   .wallet-alert-toast-summary {
       width: 100%;
       justify-content: center;
       cursor: pointer;
       pointer-events: auto;
       flex-shrink: 0;
   }

   .wallet-alert-toast-summary:hover {
       background: var(--bg-surface);
       color: var(--text-primary);
   }

   .wallet-alert-toast-summary:focus-visible {
       outline: 2px solid var(--green);
       outline-offset: 2px;
   }

/* ==========================================================================
   PREMIUM LIMIT MODAL (Glassmorphism & Gold/Yellow Glow)
   ========================================================================== */

.premium-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: rgba(0, 0, 0, 0.78);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.18s cubic-bezier(0.16, 1, 0.3, 1),
                visibility 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

.premium-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.premium-modal {
    position: relative;
    width: 100%;
    max-width: 460px;
    background: #0d0f14;
    border: 1px solid rgba(245, 158, 11, 0.35);
    box-shadow: 0 24px 64px -12px rgba(0, 0, 0, 0.95),
                0 0 40px rgba(245, 158, 11, 0.12);
    border-radius: 20px;
    padding: 32px 28px 26px;
    text-align: center;
    transform: scale(0.96) translateY(8px);
    transition: transform 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

.premium-modal-overlay.active .premium-modal {
    transform: scale(1) translateY(0);
}

.premium-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    color: var(--text-tertiary);
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    transition: all 0.15s ease;
}

.premium-modal-close:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.2);
}

.premium-modal-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 9999px;
    background: rgba(245, 158, 11, 0.08);
    border: 1px solid rgba(245, 158, 11, 0.28);
    color: #eab308;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 20px;
}

.premium-modal-badge svg {
    width: 13px;
    height: 13px;
    stroke: #eab308;
}

.premium-modal-icon-wrap {
    width: 58px;
    height: 58px;
    margin: 0 auto 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: radial-gradient(circle, rgba(234, 179, 8, 0.15) 0%, rgba(234, 179, 8, 0.03) 80%);
    border: 1px solid rgba(234, 179, 8, 0.35);
    box-shadow: 0 0 24px rgba(234, 179, 8, 0.18);
}

.premium-gold-icon {
    width: 28px;
    height: 28px;
    color: #eab308;
    stroke: #eab308;
}

.premium-modal-title {
    font-size: 21px;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 10px;
    letter-spacing: -0.02em;
}

.premium-modal-desc {
    color: var(--text-secondary);
    font-size: 13px;
    line-height: 1.5;
    margin-bottom: 20px;
}

.premium-modal-desc strong {
    color: #fbbf24;
    font-weight: 600;
}

.premium-modal-features {
    background: #050608;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    padding: 14px 16px;
    text-align: left;
    margin-bottom: 22px;
    display: flex;
    flex-direction: column;
    gap: 9px;
}

.premium-feature-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12.5px;
    color: #cbd5e1;
}

.premium-feature-check {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    border-radius: 50%;
    background: rgba(234, 179, 8, 0.15);
    color: #eab308;
    font-weight: bold;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
}

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

.premium-modal-upgrade-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 12px 20px;
    background: linear-gradient(135deg, #eab308 0%, #ca8a04 100%);
    color: #050505;
    font-size: 14px;
    font-weight: 700;
    border-radius: 10px;
    text-decoration: none;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(234, 179, 8, 0.28);
    transition: all 0.15s ease;
}

.premium-modal-upgrade-btn:hover {
    background: linear-gradient(135deg, #facc15 0%, #eab308 100%);
    box-shadow: 0 6px 20px rgba(234, 179, 8, 0.42);
    transform: translateY(-1px);
    color: #000;
}

.premium-modal-upgrade-btn svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
    fill: currentColor;
}

.premium-modal-cancel-btn {
    background: transparent;
    border: none;
    color: var(--text-tertiary);
    font-size: 12.5px;
    padding: 6px 12px;
    cursor: pointer;
    transition: color 0.15s ease;
}

.premium-modal-cancel-btn:hover {
    color: var(--text-secondary);
}
