
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Segoe UI', sans-serif; background: linear-gradient(135deg, #0d47a1 0%, #1a237e 100%); min-height: 100vh; padding: 15px; }
.container { max-width: 1000px; margin: 5px auto; background: white; border-radius: 12px; box-shadow: 0 20px 60px rgba(0,0,0,0.3); overflow: hidden; }
.header { background: linear-gradient(135deg, #0d47a1, #1a237e); color: white; padding: 15px 20px; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; }
.header h2 { font-size: 18px; }
.header-right { display: flex; gap: 8px; flex-wrap: wrap; }
.btn-link { background: rgba(255,255,255,0.2); color: white; border: 2px solid white; padding: 7px 13px; border-radius: 6px; font-weight: 600; font-size: 12px; text-decoration: none; }
.content { padding: 15px 20px; }

/* Hero */
.hero { text-align: center; padding: 18px; border-radius: 12px; margin-bottom: 14px; }
.hero-label { font-size: 11px; font-weight: 700; text-transform: uppercase; margin-bottom: 4px; opacity: 0.8; }
.hero-value { font-size: 34px; font-weight: 900; }
.hero-sub { font-size: 12px; margin-top: 6px; opacity: 0.8; }
.hero-breakdown { display: flex; justify-content: center; gap: 16px; margin-top: 10px; flex-wrap: wrap; }
.hero-item { font-size: 12px; font-weight: 700; text-align: center; }
.hero-item .hi-val { font-size: 15px; font-weight: 900; }
.hero-item .hi-label { font-size: 9px; font-weight: 600; opacity: 0.7; text-transform: uppercase; margin-top: 2px; }

/* Summary cards — 3 colunas */
.cards-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 14px; }
.dash-card { border-radius: 10px; padding: 12px 8px; text-align: center; }
.dash-card .dc-label { font-size: 9px; font-weight: 700; text-transform: uppercase; opacity: 0.8; }
.dash-card .dc-value { font-size: 17px; font-weight: 800; margin-top: 4px; }
.dash-card .dc-sub { font-size: 10px; margin-top: 2px; opacity: 0.7; }

/* Seção */
.section { margin-bottom: 16px; }
.section-title { font-size: 14px; font-weight: 800; color: #333; margin-bottom: 10px; padding-bottom: 6px; border-bottom: 2px solid #e0e0e0; display: flex; justify-content: space-between; align-items: center; }
.section-title a { font-size: 11px; font-weight: 600; color: #1565c0; text-decoration: none; }

/* Pool row */
.pool-row { display: flex; justify-content: space-between; align-items: center; padding: 10px; border: 1px solid #e8e8e8; border-radius: 8px; margin-bottom: 6px; cursor: pointer; transition: all 0.2s; }
.pool-row:hover { border-color: #1565c0; background: #f0f7ff; }
.pool-row .pr-name { font-size: 13px; font-weight: 700; color: #333; }
.pool-row .pr-badges { display: flex; gap: 4px; margin-top: 3px; flex-wrap: wrap; }
.pool-row .pr-val { font-size: 14px; font-weight: 800; color: #333; text-align: right; }
.pool-row .pr-pnl { font-size: 11px; font-weight: 700; text-align: right; }

/* Borrow row */
.borrow-row { display: flex; justify-content: space-between; align-items: center; padding: 10px; border: 1px solid #e8e8e8; border-radius: 8px; margin-bottom: 6px; }
.borrow-row .br-name { font-size: 13px; font-weight: 700; color: #333; }
.borrow-row .br-sub { font-size: 11px; color: #888; margin-top: 2px; }
.borrow-row .br-val { font-size: 14px; font-weight: 800; color: #4a2c8a; text-align: right; }
.borrow-row .br-pct { font-size: 11px; font-weight: 700; text-align: right; }

/* Colateral row */
.col-row { display: flex; justify-content: space-between; align-items: center; padding: 10px; border: 1px solid #e8e8e8; border-radius: 8px; margin-bottom: 6px; }
.col-row .cr-name { font-size: 13px; font-weight: 700; color: #333; }
.col-row .cr-sub { font-size: 11px; color: #888; margin-top: 2px; }
.col-row .cr-val { font-size: 14px; font-weight: 800; color: #00695c; text-align: right; }
.col-row .cr-pnl { font-size: 11px; font-weight: 700; text-align: right; }

/* Seção HF por rede */
.hf-chain-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; margin-bottom: 14px; }
.hf-chain-card { border-radius: 10px; padding: 12px 14px; border: 2px solid #e0e0e0; }
.hf-chain-name { font-size: 13px; font-weight: 800; color: #333; margin-bottom: 6px; }
.hf-chain-hf { font-size: 22px; font-weight: 900; margin-bottom: 4px; }
.hf-safe   { color: #2e7d32; }
.hf-warn   { color: #f57f17; }
.hf-danger { color: #c62828; }
.hf-none   { color: #999; }
.hf-chain-sub { font-size: 10px; color: #888; }
.hf-bar-bg { background: #e0e0e0; border-radius: 6px; height: 6px; margin-top: 6px; overflow: hidden; }
.hf-bar-fill { height: 100%; border-radius: 6px; }
.hf-safe-bar   { background: linear-gradient(90deg,#43a047,#2e7d32); }
.hf-warn-bar   { background: linear-gradient(90deg,#ffa000,#ff6f00); }
.hf-danger-bar { background: linear-gradient(90deg,#e53935,#b71c1c); }

/* Badges */
.chain-badge { display: inline-block; padding: 2px 7px; border-radius: 10px; font-size: 9px; font-weight: 700; }
.chain-ethereum { background: #ede7f6; color: #627eea; }
.chain-polygon  { background: #f3e5f5; color: #8247e5; }
.chain-arbitrum { background: #e3f2fd; color: #28a0f0; }
.chain-optimism { background: #fdecea; color: #ff0420; }
.chain-base     { background: #e3f2fd; color: #0052ff; }
.chain-bsc      { background: #fff8e1; color: #f0b90b; }
.chain-default  { background: #f0f0f0; color: #666; }
.status-badge   { display: inline-block; padding: 2px 7px; border-radius: 10px; font-size: 9px; font-weight: 700; }
.status-active  { background: #e8f5e9; color: #2e7d32; }

/* Alerta */
.alert-box { border-radius: 8px; padding: 12px 14px; margin-bottom: 12px; }
.alert-red   { background: #fdecea; border-left: 4px solid #c62828; color: #b71c1c; font-size: 13px; }
.alert-warn  { background: #fff8e1; border-left: 4px solid #ffa000; color: #e65100; font-size: 13px; }
.alert-green { background: #e8f5e9; border-left: 4px solid #2e7d32; color: #1b5e20; font-size: 13px; }

@media (max-width: 600px) {
    .cards-row { grid-template-columns: repeat(2, 1fr) !important; }
    .header { flex-direction: column; text-align: center; }
    .hero-breakdown { gap: 10px; }
    .hf-chain-grid { grid-template-columns: repeat(2, 1fr); }
}

