/* ── Custom styles for Minimarket Pro ────────────────────────────────── */

/* Sidebar transition */
#sidebar { transition: transform 0.25s ease; }
@media (max-width: 768px) { #sidebar.hidden-mobile { transform: translateX(-100%); } }

/* Cards */
.card { background: white; border-radius: 1rem; border: 1px solid #e5e7eb; }

/* Inputs */
.inp {
  width: 100%; padding: 0.5rem 0.75rem; border-radius: 0.5rem;
  border: 1px solid #d1d5db; font-size: 0.875rem;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.inp:focus { outline: none; border-color: #2563eb; box-shadow: 0 0 0 3px rgba(37,99,235,0.1); }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: 0.375rem; padding: 0.5rem 1rem;
  border-radius: 0.5rem; font-size: 0.875rem; font-weight: 500; cursor: pointer;
  transition: opacity 0.15s, background-color 0.15s; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-primary   { background: #2563eb; color: white; }
.btn-primary:hover:not(:disabled)  { background: #1d4ed8; }
.btn-secondary { background: #f3f4f6; color: #374151; }
.btn-secondary:hover:not(:disabled){ background: #e5e7eb; }
.btn-danger    { background: #ef4444; color: white; }
.btn-danger:hover:not(:disabled)   { background: #dc2626; }
.btn-outline   { background: white; color: #374151; border: 1px solid #d1d5db; }
.btn-outline:hover:not(:disabled)  { background: #f9fafb; }
.btn-sm        { padding: 0.25rem 0.625rem; font-size: 0.8125rem; }
.btn-xs        { padding: 0.125rem 0.375rem; font-size: 0.75rem; }

/* Badges */
.badge { display: inline-flex; align-items: center; padding: 0.125rem 0.5rem;
  border-radius: 9999px; font-size: 0.75rem; font-weight: 500; }
.badge-green  { background: #dcfce7; color: #15803d; }
.badge-red    { background: #fee2e2; color: #dc2626; }
.badge-yellow { background: #fef9c3; color: #854d0e; }
.badge-blue   { background: #dbeafe; color: #1d4ed8; }
.badge-gray   { background: #f3f4f6; color: #4b5563; }
.badge-purple { background: #f3e8ff; color: #7c3aed; }

/* Tables */
.tbl { width: 100%; border-collapse: collapse; }
.tbl th { padding: 0.625rem 1rem; text-align: left; font-size: 0.75rem; font-weight: 600;
  color: #6b7280; text-transform: uppercase; letter-spacing: 0.05em; border-bottom: 1px solid #e5e7eb; }
.tbl td { padding: 0.75rem 1rem; font-size: 0.875rem; border-bottom: 1px solid #f3f4f6; }
.tbl tr:hover td { background: #f9fafb; }

/* Toast */
.toast { display: flex; align-items: flex-start; gap: 0.75rem; padding: 0.875rem 1rem;
  border-radius: 0.75rem; box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1); max-width: 100%;
  pointer-events: auto; animation: slideIn 0.25s ease; }
.toast-success { background: #ecfdf5; color: #065f46; border-left: 4px solid #10b981; }
.toast-error   { background: #fef2f2; color: #991b1b; border-left: 4px solid #ef4444; }
.toast-info    { background: #eff6ff; color: #1e40af; border-left: 4px solid #3b82f6; }

/* Nav item */
.nav-item { display: flex; align-items: center; gap: 0.75rem; padding: 0.625rem 0.875rem;
  border-radius: 0.625rem; font-size: 0.875rem; color: #6b7280; cursor: pointer;
  transition: background 0.15s, color 0.15s; }
.nav-item:hover  { background: #f3f4f6; color: #111827; }
.nav-item.active { background: #eff6ff; color: #2563eb; font-weight: 600; }
.nav-item .icon  { width: 1.25rem; height: 1.25rem; flex-shrink: 0; }

/* Spinner */
.spinner { width: 1rem; height: 1rem; border: 2px solid currentColor; border-top-color: transparent;
  border-radius: 50%; animation: spin 0.6s linear infinite; display: inline-block; }

/* POS specific */
.product-card { background: white; border: 1px solid #e5e7eb; border-radius: 0.75rem; padding: 0.75rem;
  cursor: pointer; transition: box-shadow 0.15s, border-color 0.15s; }
.product-card:hover { box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1); border-color: #2563eb; }
.cart-item { display: flex; align-items: center; gap: 0.5rem; padding: 0.5rem 0; border-bottom: 1px solid #f3f4f6; }

/* Animations */
@keyframes spin    { to { transform: rotate(360deg); } }
@keyframes slideIn { from { opacity: 0; transform: translateX(1rem); } to { opacity: 1; transform: translateX(0); } }
@keyframes fadeIn  { from { opacity: 0; } to { opacity: 1; } }

/* Scrollbar */
::-webkit-scrollbar       { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 9999px; }
::-webkit-scrollbar-thumb:hover { background: #9ca3af; }
