.inv-pro-wrapper { font-family: -apple-system, sans-serif; max-width: 1100px; margin: auto; padding: 15px; }

/* Tarjetas Financieras Responsive */
.inv-summary-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 15px; margin-bottom: 25px; }
.summary-card { background: #fff; padding: 15px; border-radius: 10px; box-shadow: 0 2px 8px rgba(0,0,0,0.1); border-left: 4px solid #333; }
.summary-card span { display: block; font-size: 11px; text-transform: uppercase; color: #777; }
.summary-card strong { font-size: 20px; color: #333; }
.summary-card.investment { border-left-color: #6c757d; }
.summary-card.sales { border-left-color: #007bff; }
.summary-card.profit { border-left-color: #28a745; background: #f8fff9; }

/* Barra de Herramientas */
.inv-top-bar { display: flex; justify-content: space-between; align-items: center; gap: 15px; margin-bottom: 20px; flex-wrap: wrap; }
#inv-search { padding: 12px 15px; border: 1px solid #ddd; border-radius: 25px; width: 100%; max-width: 300px; }
.inv-top-buttons { display: flex; gap: 10px; }
.btn-main-inv { background: #007bff; color: #fff; border: none; padding: 10px 20px; border-radius: 5px; cursor: pointer; }
.btn-pdf-inv { background: #28a745; color: #fff; border: none; padding: 10px 20px; border-radius: 5px; cursor: pointer; }

/* TABLA RESPONSIVE */
.inv-table-v2 { width: 100%; border-collapse: collapse; background: #fff; border-radius: 8px; overflow: hidden; }
.inv-table-v2 th { background: #f8f9fa; padding: 15px; text-align: left; font-size: 13px; border-bottom: 2px solid #eee; }
.inv-table-v2 td { padding: 15px; border-bottom: 1px solid #f0f0f0; }
.cat-pill { background: #eee; padding: 2px 6px; border-radius: 4px; font-size: 11px; color: #666; }
.margin-text { color: #28a745; font-weight: bold; }

@media (max-width: 768px) {
    .inv-table-v2 thead { display: none; }
    .inv-table-v2 tr { display: block; border: 1px solid #ddd; margin-bottom: 15px; border-radius: 8px; padding: 10px; position: relative; }
    .inv-table-v2 td { display: block; text-align: right; padding: 10px 5px; border: none; border-bottom: 1px solid #eee; }
    .inv-table-v2 td:last-child { border: none; }
    .inv-table-v2 td::before { content: attr(data-label); float: left; font-weight: bold; color: #555; }
    #inv-search { max-width: 100%; order: 2; }
    .inv-top-buttons { width: 100%; justify-content: space-between; order: 1; }
}

/* Modal */
.inv-modal-overlay { display: none; position: fixed; z-index: 9999; left:0; top:0; width:100%; height:100%; background:rgba(0,0,0,0.7); align-items: center; justify-content: center; }
.inv-modal-inner { background:#fff; width: 90%; max-width: 500px; border-radius: 12px; position: relative; max-height: 90vh; overflow-y: auto; }
.inv-modal-header { padding: 15px 20px; background:#f8f9fa; display:flex; justify-content: space-between; align-items: center; border-bottom: 1px solid #eee; }
#invForm { padding: 20px; }
.inv-form-group { margin-bottom: 15px; }
.inv-form-group label { display: block; font-weight: bold; margin-bottom: 5px; font-size: 13px; }
.inv-form-group input, .inv-form-group textarea { width: 100%; padding: 10px; border: 1px solid #ddd; border-radius: 5px; box-sizing: border-box; }
.inv-form-row { display: flex; gap: 15px; }
.inv-form-row div { flex: 1; }
.financial-bg { background: #f0f7ff; padding: 15px; border-radius: 8px; margin-bottom: 15px; border: 1px solid #d0e3ff; }
#profit-display { text-align: right; font-weight: bold; margin-bottom: 15px; }
.btn-save-full { width: 100%; background: #007bff; color: #fff; padding: 15px; border: none; border-radius: 5px; font-weight: bold; cursor: pointer; }