
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Segoe UI', sans-serif; background: linear-gradient(135deg, #1b5e20 0%, #2e7d32 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, #1b5e20, #388e3c); 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; align-items: center; }
.btn-back { background: rgba(255,255,255,0.2); color: white; border: 2px solid white; padding: 7px 13px; border-radius: 6px; font-weight: 600; font-size: 13px; text-decoration: none; }
.btn-add { background: white; color: #1b5e20; border: none; padding: 8px 16px; border-radius: 8px; font-weight: 700; font-size: 13px; cursor: pointer; }
.content { padding: 15px 20px; }

/* Tabs */
.tabs { display: flex; gap: 4px; margin-bottom: 20px; border-bottom: 2px solid #e0e0e0; padding-bottom: 0; flex-wrap: wrap; }
.tab { padding: 10px 16px; border: none; background: none; font-size: 13px; font-weight: 600; color: #888; cursor: pointer; border-bottom: 3px solid transparent; margin-bottom: -2px; transition: all 0.2s; white-space: nowrap; }
.tab.active { color: #1b5e20; border-bottom-color: #2e7d32; }
.tab-content { display: none; }
.tab-content.active { display: block; }

/* Alertas */
.alertas { margin-bottom: 15px; }
.alerta { display: flex; align-items: flex-start; gap: 10px; padding: 10px 14px; border-radius: 8px; margin-bottom: 8px; font-size: 13px; font-weight: 600; }
.alerta-vermelho { background: #fdecea; color: #c62828; border-left: 4px solid #e53935; }
.alerta-amarelo { background: #fff8e1; color: #f57f17; border-left: 4px solid #ffc107; }
.alerta-azul { background: #e3f2fd; color: #1565c0; border-left: 4px solid #1976d2; }
.alerta-verde { background: #e8f5e9; color: #1b5e20; border-left: 4px solid #43a047; }

/* Resumo */
.summary-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 15px; }
.summary-card { border-radius: 10px; padding: 12px; text-align: center; }
.summary-card .label { font-size: 11px; font-weight: 600; opacity: 0.8; margin-bottom: 4px; }
.summary-card .value { font-size: 18px; font-weight: 800; }
.s-limite { background: #e8f5e9; color: #2e7d32; }
.s-usado { background: #fff3e0; color: #e65100; }
.s-disponivel { background: #e3f2fd; color: #1565c0; }
@media (max-width: 600px) {
    .summary-grid { grid-template-columns: repeat(2, 1fr) !important; }
}

/* Filtros */
.filters { display: flex; gap: 8px; margin-bottom: 15px; flex-wrap: wrap; }
.filter-btn { padding: 6px 14px; border-radius: 20px; border: 2px solid #ddd; background: white; font-size: 12px; font-weight: 600; cursor: pointer; transition: all 0.2s; color: #555; }
.filter-btn.active { background: #2e7d32; color: white; border-color: #2e7d32; }

/* Cards */
.section-title { font-size: 14px; font-weight: 700; color: #333; margin: 15px 0 10px; display: flex; align-items: center; gap: 8px; }
.cards-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.card-item { border: 2px solid #e0e0e0; border-radius: 12px; padding: 14px; cursor: pointer; transition: all 0.2s; }
.card-item:hover { border-color: #2e7d32; box-shadow: 0 4px 15px rgba(46,125,50,0.2); transform: translateY(-2px); }
.card-item.alerta-30 { border-color: #e53935; }
.card-item.ok { border-color: #a5d6a7; }
.card-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 8px; }
.card-nome { font-size: 14px; font-weight: 700; color: #222; }
.card-digits { font-size: 11px; color: #888; margin-top: 2px; }
.card-titular { font-size: 11px; color: #555; }
.card-banco { font-size: 11px; background: #f5f5f5; padding: 3px 8px; border-radius: 10px; color: #555; }
.uso-label { font-size: 11px; color: #666; margin: 8px 0 4px; display: flex; justify-content: space-between; }
.barra { background: #f0f0f0; border-radius: 10px; height: 8px; overflow: hidden; }
.barra-fill { height: 100%; border-radius: 10px; transition: width 0.5s; }
.barra-verde { background: linear-gradient(90deg, #43a047, #66bb6a); }
.barra-amarelo { background: linear-gradient(90deg, #ffa000, #ffc107); }
.barra-vermelho { background: linear-gradient(90deg, #e53935, #ef5350); }
.card-footer { display: flex; justify-content: space-between; margin-top: 10px; flex-wrap: wrap; gap: 5px; }
.card-badge { font-size: 10px; padding: 3px 8px; border-radius: 10px; font-weight: 600; }
.badge-pessoal { background: #e3f2fd; color: #1565c0; }
.badge-business { background: #fce4ec; color: #880e4f; }
.badge-reward { background: #e8f5e9; color: #1b5e20; }
.badge-promo { background: #fff8e1; color: #f57f17; }
.badge-alert { background: #fdecea; color: #c62828; }
.datas-row { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.data-chip { font-size: 10px; background: #f5f5f5; padding: 3px 8px; border-radius: 8px; color: #444; }

/* Próximos Pagamentos - TOPO */
.proximos-box { background: linear-gradient(135deg, #fff8e1, #fff3e0); border: 2px solid #ff9800; border-radius: 12px; padding: 14px; margin-bottom: 18px; }
.proximos-title { font-size: 15px; font-weight: 800; color: #e65100; margin-bottom: 10px; display: flex; align-items: center; gap: 6px; }
.proximos-grid { display: grid; gap: 8px; }
.prox-card { background: white; border-radius: 10px; padding: 12px; display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; border-left: 4px solid #ff9800; }
.prox-card.prox-hoje { border-left-color: #e53935; background: #fff5f5; }
.prox-card.prox-atrasado { border-left-color: #b71c1c; background: #fce4ec; }
.prox-card.prox-amanha { border-left-color: #ffc107; }
.prox-info { flex: 1; min-width: 160px; }
.prox-nome { font-size: 13px; font-weight: 700; color: #333; }
.prox-sub { font-size: 11px; color: #666; margin-top: 2px; }
.prox-tag { font-size: 11px; font-weight: 700; padding: 3px 10px; border-radius: 15px; }
.prox-tag-hoje { background: #e53935; color: white; }
.prox-tag-atrasado { background: #b71c1c; color: white; }
.prox-tag-amanha { background: #ffc107; color: #333; }
.prox-tag-breve { background: #e3f2fd; color: #1565c0; }
.prox-right { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.prox-valor { font-size: 16px; font-weight: 800; color: #e65100; }
.btn-pago { background: #43a047; color: white; border: none; padding: 8px 16px; border-radius: 8px; font-weight: 700; font-size: 12px; cursor: pointer; transition: all 0.2s; }
.btn-pago:hover { background: #2e7d32; transform: scale(1.05); }
.btn-pago:active { transform: scale(0.95); }
.proximos-ok { text-align: center; padding: 15px; color: #2e7d32; font-weight: 700; font-size: 14px; }

/* Tab Pagar Hoje */
.pagar-hoje-grid { display: grid; gap: 12px; }
.pagar-card { border: 2px solid #e0e0e0; border-radius: 12px; padding: 15px; display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.pagar-card.pagar-hoje { border-color: #43a047; background: #f0fff4; }
.pagar-card.pagar-amanha { border-color: #ffc107; background: #fffde7; }
.pagar-card.pagar-em-breve { border-color: #90caf9; background: #e3f2fd; }
.pagar-card.pagar-atrasado { border-color: #e53935; background: #fdecea; }
.pagar-info .nome { font-size: 15px; font-weight: 700; color: #222; }
.pagar-info .sub { font-size: 12px; color: #666; margin-top: 3px; }
.pagar-info .modo { font-size: 11px; font-weight: 700; margin-top: 4px; }
.pagar-right { text-align: right; }
.pagar-saldo { font-size: 18px; font-weight: 800; color: #1b5e20; }
.pagar-tag { font-size: 12px; font-weight: 700; padding: 4px 12px; border-radius: 20px; display: inline-block; margin-top: 4px; }
.tag-hoje { background: #43a047; color: white; }
.tag-amanha { background: #ffc107; color: #333; }
.tag-breve { background: #1976d2; color: white; }
.tag-atrasado { background: #e53935; color: white; }
.tag-nadever { background: #e0e0e0; color: #666; }

/* Tab Usar Agora */
.usar-section { background: #f0fff4; border: 2px solid #a5d6a7; border-radius: 12px; padding: 18px; margin-bottom: 20px; }
.usar-section h3 { font-size: 15px; color: #1b5e20; margin-bottom: 12px; font-weight: 700; }
.usar-form { display: flex; gap: 8px; flex-wrap: wrap; align-items: flex-end; }
.usar-form > div { flex: 1; min-width: 130px; }
.usar-form label { display: block; font-size: 12px; font-weight: 600; color: #333; margin-bottom: 5px; }
.usar-form select, .usar-form input { width: 100%; padding: 10px; border: 2px solid #a5d6a7; border-radius: 8px; font-size: 13px; }
.usar-btn { background: #2e7d32; color: white; border: none; padding: 10px 20px; border-radius: 8px; font-weight: 700; cursor: pointer; font-size: 13px; white-space: nowrap; align-self: flex-end; }
.usar-resultado { margin-top: 15px; display: none; }
.resultado-card { background: white; border-radius: 10px; padding: 15px; border-left: 5px solid #2e7d32; margin-bottom: 10px; }
.resultado-card.segundo { border-left-color: #90caf9; opacity: 0.85; }
.resultado-rank { font-size: 11px; font-weight: 700; color: #888; margin-bottom: 5px; }
.resultado-nome { font-size: 16px; font-weight: 800; color: #1b5e20; }
.resultado-detalhe { font-size: 12px; color: #555; margin-top: 5px; line-height: 1.6; }
.resultado-aviso { font-size: 11px; color: #880e4f; font-weight: 600; margin-top: 5px; }
.regras-box { background: #fff8e1; border: 1px solid #ffe082; border-radius: 10px; padding: 14px; margin-top: 15px; font-size: 12px; color: #555; line-height: 1.8; }
.regras-box strong { color: #1b5e20; }

/* Meta Bonus */
.meta-grid { display: grid; gap: 12px; }
.meta-card { border: 2px solid #e0e0e0; border-radius: 12px; padding: 14px; }
.meta-card.urgente { border-color: #e53935; }
.meta-card.ok { border-color: #ffc107; }
.meta-card.concluida { border-color: #43a047; background: #f9fff9; }
.meta-nome { font-size: 14px; font-weight: 700; color: #222; margin-bottom: 5px; }
.meta-desc { font-size: 12px; color: #555; margin-bottom: 10px; }
.meta-barra-wrap { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.meta-barra { flex: 1; background: #f0f0f0; border-radius: 10px; height: 10px; overflow: hidden; }
.meta-barra-fill { height: 100%; border-radius: 10px; background: linear-gradient(90deg, #43a047, #66bb6a); }
.meta-barra-pct { font-size: 12px; font-weight: 700; color: #2e7d32; min-width: 38px; text-align: right; }
.meta-footer { display: flex; justify-content: space-between; font-size: 11px; color: #888; }

.empty { text-align: center; padding: 40px; color: #aaa; font-size: 14px; }

/* Busca */
.search-box { position: relative; margin-bottom: 15px; }
.search-box input { width: 100%; padding: 11px 14px 11px 40px; border: 2px solid #e0e0e0; border-radius: 10px; font-size: 14px; font-family: inherit; background: #fafafa; transition: all 0.2s; }
.search-box input:focus { outline: none; border-color: #2e7d32; background: white; box-shadow: 0 2px 8px rgba(46,125,50,0.15); }
.search-box input::placeholder { color: #aaa; }
.search-icon { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); font-size: 16px; color: #888; pointer-events: none; }
.search-clear { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); background: #e0e0e0; border: none; border-radius: 50%; width: 22px; height: 22px; font-size: 12px; cursor: pointer; display: none; color: #555; line-height: 22px; text-align: center; }
.search-clear:hover { background: #ccc; }

/* Dark Mode */
body.dark-mode { background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%); }
body.dark-mode .container { background: #0f0f23; color: #e0e0e0; }
body.dark-mode .header { }
body.dark-mode .content { color: #e0e0e0; }
body.dark-mode input, body.dark-mode select, body.dark-mode textarea { background: #16213e; color: #e0e0e0; border-color: #333; }
body.dark-mode .card-item, body.dark-mode .summary-card { border-color: #333; }

