/* InvenHogar - Custom Styles */

/* ── Layout ── */
.section { animation: fadeIn 0.2s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ── Cards ── */
.card { background: #fff; border-radius: 0.75rem; border: 1px solid #E5E7EB; box-shadow: 0 1px 3px rgba(0,0,0,.06); }

/* ── Nav active state ── */
.nav-active { background: #EFF6FF !important; color: #2563EB !important; font-weight: 600; }
.nav-active i { color: #2563EB !important; }

/* ── Buttons ── */
.btn-icon { width: 36px; height: 36px; border-radius: 8px; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: background 0.15s; }
.btn-icon:hover { background: #F3F4F6; }
.btn-icon-sm { width: 30px; height: 30px; border-radius: 6px; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: background 0.15s; }
.btn-icon-sm:hover { background: #F3F4F6; }

/* ── Form controls ── */
.form-label { display: block; font-size: 0.8125rem; font-weight: 500; color: #374151; margin-bottom: 0.375rem; }
.form-input {
  width: 100%; padding: 0.5rem 0.75rem; font-size: 0.875rem;
  border: 1.5px solid #E5E7EB; border-radius: 0.5rem;
  background: #fff; color: #111827;
  transition: border-color 0.15s, box-shadow 0.15s;
  outline: none;
}
.form-input:focus { border-color: #2563EB; box-shadow: 0 0 0 3px rgba(37,99,235,0.12); }
.form-input:hover:not(:focus) { border-color: #D1D5DB; }
select.form-input { cursor: pointer; }
textarea.form-input { resize: vertical; min-height: 72px; }

/* ── Filter select ── */
.filter-select {
  padding: 0.375rem 0.75rem; font-size: 0.8125rem;
  border: 1.5px solid #E5E7EB; border-radius: 0.5rem;
  background: #fff; cursor: pointer; outline: none; color: #374151;
}
.filter-select:focus { border-color: #2563EB; box-shadow: 0 0 0 2px rgba(37,99,235,0.1); }

/* ── Stock badges ── */
.stock-badge { font-size: 0.65rem; font-weight: 600; padding: 2px 6px; border-radius: 99px; margin-top: 2px; }
.stock-ok   { background: #DCFCE7; color: #15803D; }
.stock-low  { background: #FEF3C7; color: #B45309; }
.stock-out  { background: #FEE2E2; color: #DC2626; }

/* ── Loading bar ── */
.loading-bar {
  position: relative; overflow: hidden;
  background: #BFDBFE;
}
.loading-bar::after {
  content: ''; position: absolute; top: 0; left: -40%;
  width: 40%; height: 100%; background: #2563EB;
  animation: loadSlide 1s linear infinite;
}
@keyframes loadSlide { to { left: 140%; } }

/* ── Modal animation ── */
.modal-overlay { animation: fadeIn 0.15s ease; }
.modal-overlay > div { animation: scaleIn 0.2s ease; }
@keyframes scaleIn { from { transform: scale(0.95); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* ── Sidebar transition ── */
#sidebar { transition: transform 0.25s cubic-bezier(0.4,0,0.2,1); }

/* ── Print styles ── */
@media print {
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .no-print { display: none !important; }
}

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #D1D5DB; border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: #9CA3AF; }

/* ── Responsive table ── */
@media (max-width: 640px) {
  .filter-select { width: 100%; }
}
