/* SmartCodedBot Dashboard - Command Center */
:root {
  --bg: #030712; --bg2: #0a0f1a;
  --glass: rgba(255,255,255,.03); --glass-border: rgba(255,255,255,.06);
  --cyan: #06b6d4; --cyan-dim: rgba(6,182,212,.12); --cyan-glow: rgba(6,182,212,.25);
  --green: #4ade80; --red: #fb7185; --purple: #a78bfa;
  --text1: #f0f4f8; --text2: #94a3b8; --text3: #475569;
  --sg: 'Space Grotesk', sans-serif; --inter: 'Inter', sans-serif; --mono: 'JetBrains Mono', monospace;
  --radius: 14px; --radius-sm: 8px; --transition: .2s ease;
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: var(--inter); background: var(--bg); color: var(--text1); min-height: 100vh; overflow-x: hidden; -webkit-font-smoothing: antialiased; }
a { color: var(--cyan); text-decoration: none; }

#particleCanvas { position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }

/* Nav */
.nav { position: fixed; top: 0; left: 0; right: 0; z-index: 100; background: rgba(3,7,18,.9); backdrop-filter: blur(20px); border-bottom: 1px solid var(--glass-border); }
.nav-inner { max-width: 1200px; margin: 0 auto; padding: 0 20px; height: 56px; display: flex; align-items: center; justify-content: space-between; }
.nav-logo { display: flex; align-items: center; gap: 8px; font-family: var(--sg); font-size: 16px; font-weight: 700; color: var(--text1); text-decoration: none; }
.logo-icon { width: 28px; height: 28px; border-radius: 6px; background: linear-gradient(135deg, var(--cyan), #0891b2); display: flex; align-items: center; justify-content: center; font-size: 14px; color: #fff; font-weight: 700; }
.logo-accent { color: var(--cyan); }
.live-badge { display: flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 10px; background: rgba(74,222,128,.1); color: var(--green); font-size: 10px; font-weight: 700; letter-spacing: .5px; }
.live-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--green); animation: pulse 2s infinite; box-shadow: 0 0 6px var(--green); }
.nav-links { display: flex; gap: 2px; }
.nav-link { padding: 6px 12px; border-radius: var(--radius-sm); color: var(--text2); font-size: 13px; font-weight: 500; transition: var(--transition); text-decoration: none; }
.nav-link:hover, .nav-link.active { color: var(--text1); background: var(--glass); text-decoration: none; }
.nav-link.active { color: var(--cyan); }
.nav-right { display: flex; align-items: center; gap: 8px; }
.btn-icon { width: 34px; height: 34px; border-radius: var(--radius-sm); background: var(--glass); border: 1px solid var(--glass-border); color: var(--text2); font-size: 16px; cursor: pointer; transition: var(--transition); display: flex; align-items: center; justify-content: center; }
.btn-icon:hover { border-color: var(--cyan-dim); color: var(--cyan); }
.btn-secondary { display: inline-flex; align-items: center; padding: 6px 14px; background: var(--glass); color: var(--text1); border: 1px solid var(--glass-border); border-radius: var(--radius-sm); font-size: 12px; font-weight: 500; cursor: pointer; transition: var(--transition); text-decoration: none; }
.btn-secondary:hover { border-color: var(--cyan-dim); text-decoration: none; }
.btn-secondary.btn-sm { padding: 5px 12px; font-size: 11px; }
.btn-primary { display: inline-flex; align-items: center; justify-content: center; padding: 10px 20px; background: var(--cyan); color: #000; border: none; border-radius: var(--radius-sm); font-family: var(--sg); font-size: 14px; font-weight: 600; cursor: pointer; text-decoration: none; transition: var(--transition); }
.btn-primary:hover { opacity: .9; text-decoration: none; }
.btn-full { width: 100%; margin-bottom: 8px; }

/* Tabs */
main { position: relative; z-index: 1; padding-top: 56px; min-height: calc(100vh - 56px); }
.tab { display: none; }
.tab.active { display: block; animation: fadeIn .3s ease; }

/* Section */
.section { max-width: 1200px; margin: 0 auto; padding: 20px; }
.section-title { font-family: var(--sg); font-size: 20px; font-weight: 600; margin-bottom: 16px; }
.tab-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; flex-wrap: wrap; gap: 12px; }
.tab-header .section-title { margin-bottom: 0; }

/* Filter Pills */
.filter-pills { display: flex; gap: 6px; }
.pill { padding: 5px 14px; border-radius: 16px; background: var(--glass); border: 1px solid var(--glass-border); color: var(--text2); font-size: 12px; font-weight: 500; cursor: pointer; transition: var(--transition); }
.pill:hover { border-color: var(--cyan-dim); }
.pill.active { background: var(--cyan-dim); border-color: var(--cyan); color: var(--cyan); }

/* Stats Row */
.stats-row { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; }
.stat-card { background: var(--glass); border: 1px solid var(--glass-border); border-radius: var(--radius); padding: 16px; transition: var(--transition); }
.stat-card:hover { border-color: var(--cyan-dim); }
.stat-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; font-size: 16px; }
.stat-trend { font-size: 11px; font-weight: 600; padding: 2px 6px; border-radius: 6px; }
.stat-trend.up { background: rgba(74,222,128,.1); color: var(--green); }
.stat-num { font-family: var(--mono); font-size: 22px; font-weight: 700; color: var(--text1); display: block; margin-bottom: 4px; }
.stat-of { font-size: 14px; color: var(--text3); font-weight: 400; }
.stat-label { font-size: 11px; color: var(--text3); }

/* Metrics Grid */
.metrics-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.metric-card { background: var(--glass); border: 1px solid var(--glass-border); border-radius: var(--radius); padding: 16px; }
.metric-label { font-size: 12px; color: var(--text3); margin-bottom: 6px; text-transform: uppercase; letter-spacing: .5px; font-weight: 600; }
.metric-value { font-family: var(--mono); font-size: 20px; font-weight: 700; margin-bottom: 10px; }
.metric-value.cyan { color: var(--cyan); }
.metric-value.green { color: var(--green); }
.metric-bar { height: 4px; border-radius: 2px; background: rgba(255,255,255,.06); overflow: hidden; margin-bottom: 8px; }
.metric-fill { height: 100%; border-radius: 2px; background: var(--cyan); transition: width .8s ease; }
.metric-fill.green { background: var(--green); }
.metric-sub { font-size: 11px; color: var(--text3); }

/* Growth */
.growth-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.growth-card { background: var(--glass); border: 1px solid var(--glass-border); border-radius: var(--radius); padding: 16px; }
.growth-card h4 { font-family: var(--sg); font-size: 14px; font-weight: 600; margin-bottom: 12px; color: var(--text2); }
.growth-row { display: flex; justify-content: space-between; padding: 6px 0; font-size: 13px; color: var(--text2); border-bottom: 1px solid var(--glass-border); }
.growth-row:last-child { border: none; }
.green { color: var(--green); }

/* Services Grid */
.services-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.svc-card { display: flex; align-items: center; gap: 12px; background: var(--glass); border: 1px solid var(--glass-border); border-radius: var(--radius-sm); padding: 14px; cursor: pointer; transition: all .25s ease; position: relative; }
.svc-card:hover { border-color: var(--cyan-dim); transform: translateY(-1px); }
.svc-card:active { transform: scale(.98); }
.svc-status { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.svc-status.green { background: var(--green); box-shadow: 0 0 6px var(--green); }
.svc-status.red { background: var(--red); box-shadow: 0 0 6px var(--red); }
.svc-status.gray { background: var(--text3); }
.svc-icon { font-size: 20px; flex-shrink: 0; }
.svc-info { flex: 1; min-width: 0; }
.svc-name { font-family: var(--mono); font-size: 13px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.svc-desc { font-size: 11px; color: var(--text3); }
.svc-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; font-size: 10px; color: var(--text3); flex-shrink: 0; }
.svc-mem { color: var(--cyan); font-family: var(--mono); }

/* Products Grid */
.products-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.prod-card { background: var(--glass); border: 1px solid var(--glass-border); border-radius: var(--radius); padding: 20px; cursor: pointer; transition: all .25s ease; }
.prod-card:hover { border-color: var(--cyan-glow); transform: translateY(-2px); }
.prod-card:active { transform: scale(.98); }
.prod-icon { font-size: 28px; margin-bottom: 10px; }
.prod-card h3 { font-family: var(--sg); font-size: 16px; font-weight: 600; margin-bottom: 8px; }
.prod-card p { font-size: 12px; color: var(--text2); line-height: 1.5; margin-bottom: 14px; }
.prod-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.prod-stat { text-align: center; }
.prod-stat-v { display: block; font-family: var(--mono); font-size: 13px; font-weight: 600; color: var(--cyan); }
.prod-stat-l { font-size: 9px; color: var(--text3); text-transform: uppercase; letter-spacing: .3px; }

/* Wallets Grid */
.wallets-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.wallet-card { display: flex; align-items: center; gap: 12px; background: var(--glass); border: 1px solid var(--glass-border); border-radius: var(--radius-sm); padding: 16px; cursor: pointer; transition: var(--transition); }
.wallet-card:hover { border-color: var(--cyan-dim); }
.wallet-card:active { transform: scale(.98); }
.wallet-icon { font-size: 24px; flex-shrink: 0; }
.wallet-info { flex: 1; }
.wallet-name { font-size: 14px; font-weight: 600; }
.wallet-chain { font-size: 11px; color: var(--text3); }
.wallet-right { text-align: right; }
.wallet-bal { font-family: var(--mono); font-size: 14px; font-weight: 600; color: var(--cyan); }
.wallet-token { font-size: 11px; color: var(--text3); }

/* Revenue */
.revenue-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; flex-wrap: wrap; gap: 12px; }
.revenue-header .section-title { margin-bottom: 0; }
.revenue-total { text-align: right; }
.revenue-total-label { display: block; font-size: 11px; color: var(--text3); margin-bottom: 2px; }
.revenue-total-num { font-family: var(--mono); font-size: 28px; font-weight: 700; color: var(--cyan); }
.revenue-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.rev-card { background: var(--glass); border: 1px solid var(--glass-border); border-radius: var(--radius); padding: 18px; }
.rev-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.rev-card h3 { font-family: var(--sg); font-size: 15px; font-weight: 600; }
.rev-amount { font-family: var(--mono); font-size: 14px; color: var(--cyan); font-weight: 600; }
.rev-card p { font-size: 12px; color: var(--text3); margin-bottom: 10px; }
.rev-bar { height: 4px; border-radius: 2px; background: rgba(255,255,255,.06); overflow: hidden; margin-bottom: 4px; }
.rev-fill { height: 100%; border-radius: 2px; background: var(--cyan); }
.rev-pct { font-size: 10px; color: var(--text3); }

/* Modal */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.7); backdrop-filter: blur(8px); z-index: 200; display: flex; align-items: flex-start; justify-content: center; overflow-y: auto; padding: 60px 20px 20px; animation: fadeIn .2s ease; }
.modal-content { background: var(--bg2); border: 1px solid var(--glass-border); border-radius: var(--radius); max-width: 520px; width: 100%; overflow: hidden; }
.modal-animate { animation: modalIn .3s cubic-bezier(.34,1.56,.64,1); }
.modal-body { padding: 24px; }
.modal-head { display: flex; align-items: center; gap: 14px; margin-bottom: 20px; }
.svc-icon-lg { font-size: 36px; }
.modal-head h2 { font-family: var(--sg); font-size: 20px; font-weight: 700; }
.modal-sub { font-size: 13px; color: var(--text3); margin-top: 2px; }
.modal-desc { font-size: 14px; color: var(--text2); line-height: 1.6; margin-bottom: 20px; }
.modal-info-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 16px; }
.info-item { background: var(--glass); border-radius: var(--radius-sm); padding: 12px; }
.info-label { font-size: 10px; text-transform: uppercase; letter-spacing: .5px; color: var(--text3); margin-bottom: 4px; }
.info-value { font-family: var(--mono); font-size: 14px; color: var(--text1); display: flex; align-items: center; gap: 6px; }
.info-value.cyan { color: var(--cyan); }
.info-value.mono { font-size: 11px; word-break: break-all; }
.status-dot { width: 6px; height: 6px; border-radius: 50%; display: inline-block; }
.status-dot.green { background: var(--green); box-shadow: 0 0 4px var(--green); }
.status-dot.red { background: var(--red); }
.status-dot.gray { background: var(--text3); }
.btn-close-full { display: block; width: 100%; padding: 12px; margin-top: 8px; background: var(--glass); color: var(--text2); border: 1px solid var(--glass-border); border-radius: var(--radius-sm); font-size: 14px; cursor: pointer; text-align: center; transition: var(--transition); }
.btn-close-full:hover { border-color: var(--text3); color: var(--text1); }

/* Toast */
.toast-container { position: fixed; bottom: 20px; right: 20px; z-index: 300; display: flex; flex-direction: column; gap: 8px; }
.toast { padding: 10px 16px; border-radius: var(--radius-sm); background: var(--bg2); border: 1px solid var(--cyan-dim); color: var(--text1); font-size: 13px; animation: toastIn .3s ease; }

/* Mobile Nav */
.mobile-nav { display: none; position: fixed; bottom: 0; left: 0; right: 0; z-index: 120; background: rgba(3,7,18,.92); backdrop-filter: blur(20px); border-top: 1px solid var(--glass-border); padding: 4px 0 env(safe-area-inset-bottom, 6px); justify-content: space-around; }
.mob-tab { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 5px 10px; background: none; border: none; color: var(--text3); font-size: 9px; font-weight: 500; cursor: pointer; -webkit-tap-highlight-color: transparent; position: relative; transition: var(--transition); }
.mob-tab svg { width: 20px; height: 20px; stroke-width: 1.8; }
.mob-tab.active { color: var(--cyan); }
.mob-tab.active svg { stroke: var(--cyan); }
.mob-tab.active::before { content: ''; position: absolute; top: -4px; width: 16px; height: 2px; border-radius: 0 0 2px 2px; background: var(--cyan); }

.empty-state { text-align: center; padding: 40px; color: var(--text3); font-size: 14px; }

/* Animations */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .4; } }
@keyframes toastIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes modalIn { from { opacity: 0; transform: scale(.92) translateY(20px); } to { opacity: 1; transform: scale(1) translateY(0); } }

/* Responsive */
@media (max-width: 1024px) {
  .stats-row { grid-template-columns: repeat(3, 1fr); }
  .metrics-grid { grid-template-columns: repeat(2, 1fr); }
  .products-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .mobile-nav { display: flex; }
  .nav-links { display: none !important; }
  .nav-right .btn-secondary { display: none; }
  main { padding-bottom: 64px; }
  .toast-container { bottom: 72px; }

  .section { padding: 14px 14px; }
  .stats-row { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .stat-card { padding: 12px; }
  .stat-num { font-size: 18px; }
  .metrics-grid, .growth-grid { grid-template-columns: 1fr; gap: 8px; }
  .services-grid { grid-template-columns: 1fr; gap: 8px; }
  .products-grid { grid-template-columns: 1fr; gap: 10px; }
  .wallets-grid { grid-template-columns: 1fr; gap: 8px; }
  .revenue-grid { grid-template-columns: 1fr; gap: 8px; }
  .revenue-total-num { font-size: 22px; }
  .prod-card, .svc-card, .wallet-card, .rev-card, .metric-card, .growth-card { border-radius: 10px; }
  .svc-card:hover, .prod-card:hover, .wallet-card:hover { transform: none; }
  .svc-card:active, .prod-card:active, .wallet-card:active { transform: scale(.98); background: rgba(255,255,255,.04); }
  .modal-overlay { padding: 0; align-items: flex-end; }
  .modal-content { border-radius: 16px 16px 0 0; max-height: 90vh; overflow-y: auto; }
  .modal-body { padding: 20px 16px; }
  .filter-pills { flex-wrap: wrap; }
}
@media (max-width: 480px) {
  .stats-row { grid-template-columns: repeat(2, 1fr); }
  .stat-num { font-size: 16px; }
  .prod-stats { grid-template-columns: repeat(2, 1fr); }
}
