
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Segoe UI', sans-serif; background: linear-gradient(135deg, #1565c0 0%, #0d47a1 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, #1565c0, #0d47a1); 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; }
.btn-add { background: white; color: #1565c0; border: none; padding: 7px 14px; border-radius: 6px; font-weight: 700; font-size: 13px; cursor: pointer; }
.content { padding: 15px 20px; }

/* Summary */
.summary-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; margin-bottom: 15px; }
.summary-card { border-radius: 10px; padding: 10px 6px; text-align: center; }
.summary-card .label { font-size: 9px; font-weight: 700; text-transform: uppercase; opacity: 0.8; }
.summary-card .value { font-size: 15px; font-weight: 800; margin-top: 2px; }
.sc-tvl { background: #e3f2fd; color: #1565c0; }
.sc-pools { background: #ede7f6; color: #4a2c8a; }
.sc-fees { background: #e8f5e9; color: #2e7d32; }
.sc-pnl { background: #fff3e0; color: #e65100; }
.sc-lucro { background: #e8f5e9; color: #1b5e20; }
.sc-divida { background: #f3e5f5; color: #6a1b9a; }

/* Filter tabs */
.filter-tabs { display: flex; gap: 6px; margin-bottom: 15px; flex-wrap: wrap; }
.filter-tab { padding: 6px 12px; border-radius: 18px; border: 2px solid #ddd; background: white; font-size: 11px; font-weight: 600; cursor: pointer; color: #555; transition: all 0.2s; }
.filter-tab.active { background: #1565c0; color: white; border-color: #1565c0; }

/* Pool cards */
.pool-card { border: 2px solid #e0e0e0; border-radius: 12px; padding: 14px; margin-bottom: 12px; transition: all 0.2s; }
.pool-card:hover { border-color: #1565c0; box-shadow: 0 4px 15px rgba(21,101,192,0.15); }
.pool-card-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.pool-pair { display: flex; align-items: center; gap: 8px; }
.pool-icons { display: flex; }
.pool-icons img { width: 30px; height: 30px; border-radius: 50%; border: 2px solid white; }
.pool-icons img:last-child { margin-left: -10px; }
.pool-pair-name { font-size: 16px; font-weight: 800; color: #333; }
.pool-badges { display: flex; gap: 4px; margin-top: 3px; flex-wrap: wrap; }
.pool-actions { display: flex; gap: 6px; }
.pool-btn { background: none; border: none; font-size: 16px; cursor: pointer; opacity: 0.5; padding: 4px; }
.pool-btn:hover { opacity: 1; }

.pool-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-bottom: 8px; }
.pool-stat { background: #f8f9fa; padding: 10px; border-radius: 8px; }
.pool-stat .ps-label { font-size: 10px; font-weight: 600; color: #888; text-transform: uppercase; }
.pool-stat .ps-value { font-size: 14px; font-weight: 800; color: #333; margin-top: 2px; }

.pool-amounts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 8px; }
.pool-amount-box { background: #f0f7ff; border-radius: 8px; padding: 10px; text-align: center; }
.pool-amount-box .pab-label { font-size: 10px; font-weight: 600; color: #1565c0; text-transform: uppercase; }
.pool-amount-box .pab-value { font-size: 15px; font-weight: 800; color: #333; margin-top: 2px; }
.pool-amount-box .pab-usd { font-size: 11px; color: #999; }

.pool-notes { font-size: 11px; color: #999; margin-top: 4px; }

.pool-block { border-radius: 10px; padding: 12px; margin-bottom: 8px; }
.pool-block-title { font-size: 10px; font-weight: 700; text-transform: uppercase; color: #888; margin-bottom: 8px; letter-spacing: 0.5px; }
.pool-block-hero { text-align: center; padding: 14px; border-radius: 10px; margin-bottom: 8px; }
.pool-block-hero .hero-label { font-size: 11px; font-weight: 700; text-transform: uppercase; margin-bottom: 4px; }
.pool-block-hero .hero-value { font-size: 24px; font-weight: 900; }
.pool-block-hero .hero-sub { font-size: 11px; margin-top: 4px; opacity: 0.8; }

.range-gauge { background: #f8f9fa; border-radius: 10px; padding: 12px; margin-bottom: 8px; }
.range-gauge-title { font-size: 10px; font-weight: 700; text-transform: uppercase; color: #888; margin-bottom: 8px; letter-spacing: 0.5px; }
.range-bar-wrap { position: relative; height: 40px; margin: 0 20px; }
.range-bar { position: absolute; top: 16px; left: 0; right: 0; height: 8px; background: #e0e0e0; border-radius: 4px; }
.range-bar-fill { position: absolute; top: 16px; height: 8px; background: linear-gradient(90deg, #66bb6a, #43a047); border-radius: 4px; }
.range-marker { position: absolute; top: -8px; width: 0; height: 0; border-left: 10px solid transparent; border-right: 10px solid transparent; border-top: 14px solid #43a047; transform: translateX(-10px); z-index: 2; }
.range-marker.out { border-top-color: #c62828; }
.range-entry { position: absolute; top: 16px; width: 16px; height: 16px; border-radius: 50%; background: #378ADD; border: 2.5px solid white; transform: translateX(-8px); z-index: 1; box-shadow: 0 1px 4px rgba(0,0,0,0.2); }
.range-labels { display: flex; justify-content: space-between; margin: 0 20px; font-size: 10px; color: #888; font-weight: 600; margin-top: 4px; }
.range-legend { display: flex; justify-content: center; gap: 15px; margin-top: 6px; font-size: 10px; color: #666; }
.range-legend span { display: flex; align-items: center; gap: 4px; }
.range-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.range-tri { width: 0; height: 0; border-left: 5px solid transparent; border-right: 5px solid transparent; border-top: 8px solid #43a047; display: inline-block; }
.pool-block-row { display: flex; justify-content: space-between; padding: 4px 0; border-bottom: 1px solid #f0f0f0; font-size: 12px; }
.pool-block-row:last-child { border-bottom: none; }
.pool-block-row .pbr-label { color: #888; font-weight: 600; }
.pool-block-row .pbr-value { font-weight: 700; color: #333; }

.fee-section { background: #f8f9fa; border-radius: 10px; padding: 12px; margin-bottom: 8px; }
.fee-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.fee-title { font-size: 10px; font-weight: 700; text-transform: uppercase; color: #888; letter-spacing: 0.5px; }
.fee-total { font-size: 16px; font-weight: 900; color: #2e7d32; }
.fee-btn { background: #2e7d32; color: white; border: none; padding: 5px 12px; border-radius: 6px; font-size: 11px; font-weight: 700; cursor: pointer; }
.fee-btn:hover { background: #1b5e20; }
.fee-list { max-height: 120px; overflow-y: auto; }
.fee-item { display: flex; justify-content: space-between; align-items: center; padding: 5px 0; border-bottom: 1px solid #eee; font-size: 12px; }
.fee-item:last-child { border-bottom: none; }
.fee-item-date { color: #888; }
.fee-item-value { font-weight: 700; color: #2e7d32; }
.fee-item-del { background: none; border: none; color: #c62828; cursor: pointer; font-size: 12px; opacity: 0.5; padding: 0 4px; }
.fee-item-del:hover { opacity: 1; }
.fee-base { font-size: 11px; color: #888; margin-bottom: 6px; }

.chain-badge { display: inline-block; padding: 3px 10px; border-radius: 12px; font-size: 10px; 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-avalanche { background: #fdecea; color: #e84142; }
.chain-base { background: #e3f2fd; color: #0052ff; }
.chain-bsc { background: #fff8e1; color: #f0b90b; }
.chain-default { background: #f0f0f0; color: #666; }

.dex-badge { display: inline-block; padding: 3px 10px; border-radius: 12px; font-size: 10px; font-weight: 700; }
.dex-uniswap { background: #fce4ec; color: #ff007a; }
.dex-sushiswap { background: #ede7f6; color: #0e0f23; }
.dex-pancakeswap { background: #fff8e1; color: #633001; }
.dex-curve { background: #e3f2fd; color: #0038ff; }
.dex-balancer { background: #e8eaf6; color: #1e1e1e; }
.dex-default { background: #f0f0f0; color: #666; }

.status-badge { display: inline-block; padding: 3px 10px; border-radius: 12px; font-size: 10px; font-weight: 700; }
.status-active { background: #e8f5e9; color: #2e7d32; }
.status-closed { background: #f0f0f0; color: #999; }

/* Empty */
.empty-state { text-align: center; padding: 40px 20px; color: #999; }
.empty-state .icon { font-size: 48px; margin-bottom: 12px; }

/* Modal */
.modal-overlay { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.5); z-index: 1000; justify-content: center; align-items: flex-start; padding-top: 20px; overflow-y: auto; }
.modal-overlay.show { display: flex; }
.modal-box { background: white; border-radius: 14px; padding: 20px; width: 90%; max-width: 450px; margin-bottom: 30px; }
.modal-title { font-size: 16px; font-weight: 800; color: #333; margin-bottom: 15px; text-align: center; }
.modal-label { font-size: 12px; font-weight: 600; color: #666; margin-bottom: 5px; margin-top: 10px; }
.modal-input { width: 100%; padding: 10px; border: 2px solid #e0e0e0; border-radius: 8px; font-size: 14px; outline: none; }
.modal-input:focus { border-color: #1565c0; }
.modal-select { width: 100%; padding: 10px; border: 2px solid #e0e0e0; border-radius: 8px; font-size: 14px; outline: none; background: white; }
.modal-search { width: 100%; padding: 10px; border: 2px solid #e0e0e0; border-radius: 8px; font-size: 14px; outline: none; margin-bottom: 6px; }
.modal-search:focus { border-color: #1565c0; }
.modal-coin-list { max-height: 130px; overflow-y: auto; border: 2px solid #e0e0e0; border-radius: 8px; margin-bottom: 6px; }
.modal-coin-item { display: flex; align-items: center; gap: 8px; padding: 8px 10px; cursor: pointer; border-bottom: 1px solid #f0f0f0; }
.modal-coin-item:hover { background: #f0f7ff; }
.modal-coin-item:last-child { border-bottom: none; }
.modal-coin-item.selected { background: #e3f2fd; border-left: 3px solid #1565c0; }
.modal-coin-item img { width: 22px; height: 22px; border-radius: 50%; }
.modal-coin-item .mci-name { font-size: 12px; font-weight: 700; color: #333; }
.modal-coin-item .mci-symbol { font-size: 10px; color: #999; }
.modal-coin-item .mci-price { font-size: 11px; font-weight: 700; color: #1565c0; margin-left: auto; }
.modal-selected-coin { font-size: 12px; font-weight: 700; color: #1565c0; padding: 5px 10px; background: #e3f2fd; border-radius: 8px; text-align: center; margin-bottom: 6px; }
.modal-separator { text-align: center; font-size: 20px; color: #1565c0; margin: 8px 0; }
.modal-preview { background: #e3f2fd; padding: 12px; border-radius: 8px; margin-top: 10px; font-size: 13px; color: #1565c0; text-align: center; font-weight: 700; }
.modal-btns { display: flex; gap: 10px; margin-top: 15px; }
.modal-btn { flex: 1; padding: 12px; border-radius: 8px; font-weight: 700; font-size: 14px; cursor: pointer; border: none; }
.modal-btn-cancel { background: #f0f0f0; color: #666; }
.modal-btn-save { background: #1565c0; color: white; }

/* Dark Mode */
body.dark-mode { background: linear-gradient(135deg, #0a0a1e 0%, #16213e 100%); }
body.dark-mode .container { background: #0f0f23; color: #e0e0e0; }
body.dark-mode .pool-card { border-color: #333; background: #16213e; }
body.dark-mode .pool-card:hover { border-color: #1565c0; }
body.dark-mode .pool-pair-name { color: #e0e0e0; }
body.dark-mode .pool-stat { background: #1a1a3e; }
body.dark-mode .pool-stat .ps-value { color: #e0e0e0; }
body.dark-mode .pool-amount-box { background: #152030; }
body.dark-mode .pool-amount-box .pab-value { color: #e0e0e0; }
body.dark-mode .pool-block-row { border-color: #333; }
body.dark-mode .pool-block-row .pbr-value { color: #e0e0e0; }
body.dark-mode .fee-section { background: #16213e; }
body.dark-mode .range-gauge { background: #16213e; }
body.dark-mode .range-bar { background: #333; }
body.dark-mode .fee-item { border-color: #333; }
body.dark-mode .fee-base { color: #666; }
body.dark-mode .filter-tab { background: #16213e; border-color: #333; color: #aaa; }
body.dark-mode .summary-card.sc-tvl { background: #152030; }
body.dark-mode .summary-card.sc-pools { background: #1a153e; }
body.dark-mode .summary-card.sc-fees { background: #152e15; }
body.dark-mode .summary-card.sc-pnl { background: #2e2515; }
body.dark-mode .summary-card.sc-lucro { background: #152e20; }
body.dark-mode .summary-card.sc-divida { background: #2a153e; }
body.dark-mode .modal-box { background: #0f0f23; }
body.dark-mode .modal-title { color: #e0e0e0; }
body.dark-mode .modal-input, body.dark-mode .modal-select, body.dark-mode .modal-search { background: #16213e; color: #e0e0e0; border-color: #333; }
body.dark-mode .modal-coin-list { border-color: #333; }
body.dark-mode .modal-coin-item { border-color: #333; }
body.dark-mode .modal-coin-item:hover { background: #1a1a3e; }
body.dark-mode .modal-coin-item .mci-name { color: #e0e0e0; }
body.dark-mode .modal-selected-coin { background: #152030; }
body.dark-mode .modal-preview { background: #152030; }
body.dark-mode .modal-btn-cancel { background: #333; color: #aaa; }


/* Panorama Geral */
.panorama-section { background: #f8f9fa; border-radius: 12px; padding: 15px; margin-top: 20px; }
.panorama-title { font-size: 14px; font-weight: 800; color: #1565c0; margin-bottom: 12px; display: flex; justify-content: space-between; align-items: center; cursor: pointer; }
.panorama-tabs { display: flex; gap: 6px; margin-bottom: 15px; flex-wrap: wrap; }
.pan-tab { padding: 6px 14px; border-radius: 18px; border: 2px solid #ddd; background: white; font-size: 11px; font-weight: 700; cursor: pointer; color: #555; transition: all 0.2s; }
.pan-tab.active { background: #1565c0; color: white; border-color: #1565c0; }
.pan-content { display: none; }
.pan-content.show { display: block; }

/* Tabela comparativa */
.comp-table { width: 100%; border-collapse: collapse; font-size: 11px; }
.comp-table th { background: #1565c0; color: white; padding: 8px 6px; text-align: center; font-size: 10px; font-weight: 700; }
.comp-table td { padding: 7px 6px; text-align: center; border-bottom: 1px solid #eee; font-weight: 600; }
.comp-table tr:hover td { background: #f0f7ff; }
.comp-table .td-name { text-align: left; font-weight: 800; }

/* Gráfico de fees */
.fees-chart { display: flex; align-items: flex-end; gap: 6px; height: 120px; padding: 0 4px; margin-bottom: 6px; }
.fees-bar-wrap { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; height: 100%; justify-content: flex-end; }
.fees-bar { background: linear-gradient(180deg, #43a047, #2e7d32); border-radius: 4px 4px 0 0; width: 100%; min-height: 4px; transition: all 0.3s; cursor: default; }
.fees-bar-label { font-size: 9px; color: #888; font-weight: 600; white-space: nowrap; }
.fees-bar-val { font-size: 9px; color: #2e7d32; font-weight: 800; }

/* Alocação por pool */
.alloc-row { margin-bottom: 10px; }
.alloc-header { display: flex; justify-content: space-between; font-size: 12px; font-weight: 700; color: #333; margin-bottom: 3px; }
.alloc-bar { height: 10px; background: #e0e0e0; border-radius: 5px; overflow: hidden; }
.alloc-fill { height: 100%; border-radius: 5px; transition: width 0.5s; }

/* DEX resumo */
.dex-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.dex-card { background: white; border-radius: 10px; padding: 10px; text-align: center; border: 2px solid #e0e0e0; }
.dex-card .dc-name { font-size: 12px; font-weight: 800; color: #333; margin-bottom: 4px; }
.dex-card .dc-val { font-size: 14px; font-weight: 800; color: #1565c0; }
.dex-card .dc-sub { font-size: 10px; color: #888; font-weight: 600; }

/* Range alert melhorado */
.range-alert-item { display: flex; justify-content: space-between; align-items: center; padding: 4px 0; }
.range-alert-days { background: #c62828; color: white; border-radius: 10px; padding: 2px 8px; font-size: 10px; font-weight: 700; }


/* Drag & Drop */
.pool-card { cursor: default; }
.drag-handle { cursor: grab; font-size: 16px; color: #bbb; padding: 4px 6px; border-radius: 6px; user-select: none; transition: color 0.2s; }
.drag-handle:hover { color: #1565c0; background: #f0f7ff; }
.drag-handle:active { cursor: grabbing; }
.pool-card.dragging { opacity: 0.4; border: 2px dashed #1565c0 !important; }
.pool-card.drag-over { border: 2px solid #1565c0 !important; background: #f0f7ff; transform: scale(1.01); }


/* Quick Update Qty */
.quick-update-box { background: #f0f7ff; border-radius: 10px; padding: 10px; margin-top: 8px; display: none; }
.quick-update-box.show { display: block; }
.quick-update-row { display: flex; gap: 8px; align-items: center; margin-bottom: 6px; }
.quick-update-label { font-size: 11px; font-weight: 700; color: #1565c0; min-width: 50px; }
.quick-update-input { flex: 1; padding: 7px 10px; border: 2px solid #1565c0; border-radius: 8px; font-size: 13px; font-weight: 700; outline: none; }
.quick-update-btn { background: #1565c0; color: white; border: none; padding: 7px 14px; border-radius: 8px; font-size: 12px; font-weight: 700; cursor: pointer; }
.quick-update-btn:hover { background: #0d47a1; }
.btn-qty { background: #e3f2fd; color: #1565c0; border: 1px solid #90caf9; padding: 3px 10px; border-radius: 12px; font-size: 10px; font-weight: 700; cursor: pointer; }
.btn-qty:hover { background: #bbdefb; }

/* Quick Note */
.quick-note-area { margin-top: 6px; }
.quick-note-text { font-size: 11px; color: #888; font-style: italic; cursor: pointer; padding: 4px 8px; border-radius: 6px; border: 1px dashed #ddd; display: block; min-height: 22px; }
.quick-note-text:hover { border-color: #1565c0; color: #1565c0; }
.quick-note-input { width: 100%; padding: 6px 10px; border: 2px solid #1565c0; border-radius: 8px; font-size: 12px; outline: none; resize: none; display: none; }

/* Meta de Fees */
.meta-fees-bar { background: #e8f5e9; border-radius: 10px; padding: 10px 14px; margin-bottom: 12px; display: flex; align-items: center; gap: 10px; }
.meta-fees-bar .mf-label { font-size: 11px; font-weight: 700; color: #1b5e20; white-space: nowrap; }
.meta-fees-bar .mf-progress { flex: 1; background: #c8e6c9; border-radius: 6px; height: 10px; overflow: hidden; }
.meta-fees-bar .mf-fill { height: 100%; background: linear-gradient(90deg, #43a047, #2e7d32); border-radius: 6px; transition: width 0.5s; }
.meta-fees-bar .mf-val { font-size: 11px; font-weight: 800; color: #1b5e20; white-space: nowrap; }
.meta-fees-bar .mf-edit { background: none; border: none; font-size: 13px; cursor: pointer; opacity: 0.5; }
.meta-fees-bar .mf-edit:hover { opacity: 1; }
.meta-fees-input { width: 90px; padding: 4px 8px; border: 2px solid #2e7d32; border-radius: 8px; font-size: 12px; font-weight: 700; outline: none; display: none; }

/* Archive toggle */
.archive-toggle { display: inline-flex; align-items: center; gap: 5px; padding: 5px 12px; border-radius: 18px; border: 2px solid #ddd; background: white; font-size: 11px; font-weight: 600; cursor: pointer; color: #888; margin-left: 4px; }
.archive-toggle.showing { background: #fff8e1; border-color: #ffa000; color: #f57f17; }

/* Liquidation alert */
.liq-alert { background: #fff3e0; border-left: 4px solid #ff6f00; border-radius: 8px; padding: 10px 12px; margin-bottom: 12px; display: none; }
.liq-alert-title { font-weight: 700; color: #e65100; font-size: 13px; }
.liq-alert-list { font-size: 12px; color: #bf360c; margin-top: 4px; }

/* Perf history tab */
.perf-line { display: flex; align-items: flex-end; gap: 2px; height: 100px; padding: 0 4px; margin-bottom: 6px; }
.perf-point { flex: 1; position: relative; cursor: default; }
.perf-bar { width: 100%; border-radius: 2px 2px 0 0; }
.perf-dot { width: 6px; height: 6px; border-radius: 50%; background: #1565c0; position: absolute; bottom: 0; left: 50%; transform: translateX(-50%); }

@media (max-width: 600px) {
    .summary-grid { grid-template-columns: repeat(3, 1fr) !important; }
    .header { flex-direction: column; text-align: center; }
    .pool-grid { grid-template-columns: 1fr 1fr; }
}

