/* ═══════════════════════════════════════════
   FRITITRUCK — Estilos específicos por página
   (Ventas, Inventario, Reportes, Kardex)
   ═══════════════════════════════════════════ */

/* ── Pantalla de venta ─────────────────── */
.venta-layout    { display: grid; grid-template-columns: 1fr 340px; gap: 1.5rem; align-items: start; }
.productos-grid  { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }

.producto-card {
  background: #fff; border: 1.5px solid var(--gray-200);
  border-radius: var(--radius); padding: 1rem;
  cursor: pointer; transition: all 0.12s;
  text-align: center; user-select: none;
}
.producto-card:hover            { border-color: var(--green); background: var(--green-light); }
.producto-card.selected         { border-color: var(--green); background: var(--green-light); box-shadow: 0 0 0 1.5px var(--green); }
.producto-card.out-of-stock     { opacity: 0.5; cursor: not-allowed; border-color: var(--gray-200); background: var(--gray-50); }
.producto-card .p-name          { font-size: 13px; font-weight: 700; color: var(--gray-900); margin-bottom: 4px; }
.producto-card .p-price         { font-size: 12px; font-weight: 600; color: var(--gray-600); }

/* ── Carrito ──────────────────────────── */
.carrito-panel      { background: #fff; border: 1px solid var(--gray-100); border-radius: var(--radius); position: sticky; top: 1.5rem; overflow: hidden; }
.carrito-header     { padding: 1rem 1.25rem; background: var(--gray-50); border-bottom: 1px solid var(--gray-100); font-size: 14px; font-weight: 700; color: var(--gray-900); }
.carrito-items      { padding: 0.5rem; min-height: 180px; max-height: 350px; overflow-y: auto; }
.carrito-item       { display: flex; align-items: flex-start; gap: 8px; padding: 10px; border-bottom: 1px solid var(--gray-50); }
.ci-name            { flex: 1; font-size: 13px; font-weight: 600; color: var(--gray-900); line-height: 1.3; }
.ci-qty             { display: flex; align-items: center; gap: 6px; margin-top: 4px; }
.ci-qty button      { width: 22px; height: 22px; border: 1.5px solid var(--gray-200); border-radius: 50%; background: #fff; font-size: 12px; cursor: pointer; display: flex; align-items: center; justify-content: center; color: var(--gray-600); }
.ci-qty button:hover { border-color: var(--green); color: var(--green); }
.ci-qty span        { font-size: 12px; font-weight: 600; min-width: 16px; text-align: center; }
.ci-subtotal        { font-size: 13px; font-weight: 700; color: var(--green); min-width: 60px; text-align: right; }
.ci-remove          { color: var(--gray-400); cursor: pointer; font-size: 18px; line-height: 1; padding: 0 4px; background: none; border: none; margin-left: 4px; }
.ci-remove:hover    { color: var(--red); }
.carrito-footer     { padding: 1.25rem; border-top: 1px dashed var(--gray-200); background: #fff; }
.carrito-total-row  { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; }
.carrito-total-label { font-size: 14px; font-weight: 700; color: var(--gray-900); }
.carrito-total-value { font-size: 24px; font-weight: 800; color: var(--green); }
.carrito-empty      { text-align: center; color: var(--gray-400); font-size: 13px; padding: 2rem 1rem; }

/* ── Kardex ──────────────────────────── */
.kardex-modal               { max-width: 860px; }
.kardex-header-info         { display: flex; gap: 1.5rem; flex-wrap: wrap; background: var(--gray-50); border-radius: var(--radius); padding: 1rem 1.25rem; margin-bottom: 1.25rem; border: 1px solid var(--gray-100); }
.kardex-header-info > div   { flex: 1; min-width: 120px; }
.kardex-header-info label   { font-size: 11px; color: var(--gray-400); font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; display: block; margin-bottom: 3px; }
.kardex-header-info span    { font-size: 14px; font-weight: 700; color: var(--gray-900); }
.kardex-table-wrap          { overflow-x: auto; }
.kardex-table               { width: 100%; border-collapse: collapse; min-width: 640px; font-size: 12px; }
.kardex-table thead tr:first-child th  { background: var(--green); color: #fff; text-align: center; padding: 8px 6px; font-size: 12px; font-weight: 700; border: 1px solid rgba(255,255,255,0.2); }
.kardex-table thead tr:first-child th:nth-child(3) { background: #c05e0a; }
.kardex-table thead tr:first-child th:nth-child(4) { background: #1a5fa8; }
.kardex-table thead tr:last-child th   { background: var(--gray-100); color: var(--gray-600); text-align: center; padding: 7px 6px; font-size: 11px; font-weight: 600; border: 1px solid var(--gray-200); text-transform: uppercase; }
.kardex-table tbody td                 { padding: 8px 8px; text-align: center; border: 1px solid var(--gray-100); color: var(--gray-900); vertical-align: middle; }
.kardex-table tbody tr:hover td        { background: var(--gray-50); }
.kardex-table td.fecha-col             { text-align: left; font-weight: 500; white-space: nowrap; }
.kardex-table td.section-compra        { background: rgba(26,122,74,0.05); }
.kardex-table td.section-venta         { background: rgba(232,102,10,0.05); }
.kardex-table td.section-saldo         { background: rgba(26,95,168,0.06); font-weight: 700; }
.kardex-table td.empty                 { color: var(--gray-300); }
.kardex-saldo-final { display: flex; justify-content: space-between; align-items: center; background: var(--green-light); border-radius: var(--radius-sm); padding: 10px 14px; margin-top: 1rem; }
.kardex-saldo-final span { font-size: 13px; color: var(--green); font-weight: 700; }

/* ── Reportes ─────────────────────────── */
.periodo-btn-active    { background: var(--green-light) !important; border-color: var(--green) !important; color: var(--green) !important; font-weight: 700 !important; }
#grafica-ventas        { width: 100%; }
.reporte-search-highlight { background: #fff3cd; }
