* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Segoe UI', system-ui, sans-serif; background: #0f172a; color: #e2e8f0; min-height: 100vh; }
.container { max-width: 1400px; margin: 0 auto; padding: 12px 16px; }
h1 { font-size: 20px; margin-bottom: 8px; color: #38bdf8; text-align: center; display: flex; align-items: center; justify-content: center; gap: 8px; }
.logo-icon { height: 24px; width: 24px; object-fit: contain; }
.input-group { margin-bottom: 8px; max-width: 600px; margin-left: auto; margin-right: auto; }
.input-group label { display: block; font-size: 13px; color: #94a3b8; margin-bottom: 4px; }
.search-wrap { width: 100%; position: relative; }
.search-wrap input { width: 100%; padding: 8px 36px 8px 12px; border: 1px solid #334155; border-radius: 8px; background: #1e293b; color: #e2e8f0; font-size: 13px; }
.search-wrap input:focus { outline: none; border-color: #38bdf8; }
.btn-clear { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); background: transparent; border: none; color: #64748b; font-size: 16px; cursor: pointer; padding: 2px 6px; line-height: 1; transition: color 0.2s; }
.btn-clear:hover { color: #f87171; }
.search-dropdown { position: absolute; top: 100%; left: 0; right: 0; background: #1e293b; border: 1px solid #334155; border-radius: 8px; max-height: 260px; overflow-y: auto; z-index: 100; display: none; margin-top: 4px; }
.search-dropdown.open { display: block; }
.search-item { padding: 10px 14px; cursor: pointer; border-bottom: 1px solid #334155; display: flex; align-items: center; gap: 8px; }
.search-item:last-child { border-bottom: none; }
.search-item:hover { background: #334155; }
.search-item .si-name { font-size: 13px; color: #e2e8f0; font-weight: 600; }
.search-item .si-type { font-size: 10px; padding: 1px 6px; border-radius: 3px; font-weight: 700; }
.search-item .si-type.app { background: #fbbf24; color: #0f172a; }
.search-item .si-type.val { background: #38bdf8; color: #0f172a; }
.search-item .si-id { font-size: 10px; color: #64748b; font-family: 'Consolas', monospace; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.status { font-size: 13px; color: #94a3b8; margin-bottom: 8px; min-height: 0; display: flex; align-items: center; justify-content: center; }
.status.loading { min-height: 300px; }
.loader { display: none; gap: 12px; }
.status.loading .loader { display: flex; }
.loader span { width: 20px; height: 20px; border-radius: 50%; animation: bounce 1.4s ease-in-out infinite; }
.loader span:nth-child(1) { background: #4285f4; animation-delay: 0s; }
.loader span:nth-child(2) { background: #ea4335; animation-delay: 0.2s; }
.loader span:nth-child(3) { background: #fbbc04; animation-delay: 0.4s; }
.loader span:nth-child(4) { background: #34a853; animation-delay: 0.6s; }
@keyframes bounce { 0%, 80%, 100% { transform: translateY(0); } 40% { transform: translateY(-24px); } }

.cards, .table-wrapper { display: none; }
.cards.show, .table-wrapper.show { display: block; }

.card-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 8px; }
.card { background: #1e293b; border: 1px solid #334155; border-radius: 6px; overflow: hidden; }
.card-header { display: flex; align-items: center; gap: 6px; padding: 6px 10px; border-bottom: 1px solid #334155; }
.app-card .card-header { background: linear-gradient(135deg, #1e293b 0%, #1a2744 100%); }
.validator-card .card-header { background: linear-gradient(135deg, #1e293b 0%, #1a2a3a 100%); }
.card-icon { font-size: 16px; }
.card-title { font-size: 14px; font-weight: 700; color: #e2e8f0; }
.card-body { padding: 6px 10px; }
.card-row { display: flex; justify-content: space-between; align-items: center; padding: 3px 0; border-bottom: 1px solid rgba(51,65,85,0.4); }
.card-row:last-child { border-bottom: none; }
.card-label { font-size: 10px; color: #94a3b8; text-transform: uppercase; letter-spacing: 0.3px; }
.card-value { font-size: 11px; color: #e2e8f0; font-weight: 500; text-align: right; max-width: 70%; word-break: break-all; }
.card-value.mono { font-family: 'Consolas', monospace; font-size: 9px; color: #64748b; }

.badge { display: inline-block; font-size: 9px; font-weight: 700; padding: 2px 6px; border-radius: 3px; margin-left: 4px; vertical-align: middle; }
.badge.featured { background: #fbbf24; color: #0f172a; }
.badge.app { background: #a78bfa; color: #0f172a; }
.badge.validator { background: #38bdf8; color: #0f172a; }
.badge.version { background: #334155; color: #94a3b8; font-family: 'Consolas', monospace; font-size: 8px; }

.positive { color: #4ade80; }
.negative { color: #f87171; }

table { width: 100%; border-collapse: collapse; font-size: 10px; background: #1e293b; border-radius: 6px; overflow: hidden; }
thead th { background: #334155; color: #94a3b8; padding: 6px 4px; text-align: center; border-bottom: 2px solid #475569; white-space: nowrap; font-size: 9px; text-transform: uppercase; letter-spacing: 0.3px; }
tbody td { padding: 4px 4px; border-bottom: 1px solid #334155; text-align: center; white-space: nowrap; font-size: 9px; }
tbody tr:hover { background: #2d3748; }
.table-wrapper { overflow-x: auto; margin-top: 0; border-radius: 6px; }
.table-controls { display: flex; justify-content: flex-end; padding: 6px 0; margin-bottom: 6px; }
.btn-toggle { background: #38bdf8; color: #0f172a; border: none; padding: 4px 12px; border-radius: 4px; font-size: 10px; font-weight: 600; cursor: pointer; transition: background 0.2s; }
.btn-toggle:hover { background: #0ea5e9; }
tbody tr.hidden { display: none; }

.badge.summary { background: #10b981; color: #0f172a; }

.summary-card { margin-top: 0; margin-bottom: 8px; }
.summary-body { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
.summary-body .card-row { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 6px; background: rgba(51,65,85,0.3); border-radius: 4px; border: none; }
.summary-body .card-label { margin-bottom: 3px; font-size: 9px; }
.summary-body .card-value { font-size: 11px; font-weight: 700; max-width: 100%; }
.summary-pnl { grid-column: 1 / -1; }
.summary-pnl .card-value { font-size: 12px; }

.alert-no-tx { background: rgba(248, 113, 113, 0.2); border: 1px solid #f87171; border-radius: 6px; padding: 8px 12px; margin-bottom: 8px; text-align: center; font-size: 11px; color: #fca5a5; animation: blink 1.5s ease-in-out infinite; }
.alert-no-tx strong { color: #f87171; font-weight: 700; }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }

@media (max-width: 640px) { .card-grid { grid-template-columns: 1fr; } .summary-body { grid-template-columns: 1fr; } }
