/* ============ CrediGestor Pro - Estilos personalizados ============ */

/* Botones del sidebar */
.nav-btn {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.6rem 0.9rem;
  border-radius: 0.6rem;
  font-size: 0.9rem;
  text-align: left;
  color: #d1e7dd;
  transition: all 0.15s ease;
  cursor: pointer;
}
.nav-btn:hover { background-color: #146c43; color: #fff; }
.nav-btn.active { background-color: #fff; color: #0F5132; font-weight: 600; }

/* Sidebar colapsado */
#sidebar.collapsed { width: 4.5rem; }
#sidebar.collapsed .sidebar-text { display: none; }

/* Scrollbar sutil */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

/* Tarjetas del dashboard */
.stat-card {
  background: #fff;
  border-radius: 1rem;
  padding: 1rem 1.25rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  border: 1px solid #e2e8f0;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.stat-card:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(0,0,0,0.08); }

/* Tablas */
.tabla { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
.tabla th {
  text-align: left; padding: 0.75rem;
  background: #f1f5f9; color: #334155;
  font-weight: 600; border-bottom: 1px solid #e2e8f0;
}
.tabla td { padding: 0.7rem 0.75rem; border-bottom: 1px solid #f1f5f9; }
.tabla tr:hover td { background: #f8fafc; }

/* Alertas de stock */
.stock-bajo { background: #fee2e2 !important; }
.badge {
  display: inline-block; padding: 0.15rem 0.6rem; border-radius: 9999px;
  font-size: 0.7rem; font-weight: 600;
}
.badge-green  { background:#dcfce7; color:#166534; }
.badge-red    { background:#fee2e2; color:#991b1b; }
.badge-yellow { background:#fef9c3; color:#854d0e; }
.badge-blue   { background:#dbeafe; color:#1e40af; }
.badge-gray   { background:#e2e8f0; color:#475569; }

/* Toast */
.toast-item {
  min-width: 240px;
  padding: 0.75rem 1rem;
  border-radius: 0.75rem;
  color: #fff;
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
  animation: slideIn 0.25s ease;
}
@keyframes slideIn { from { opacity:0; transform: translateX(20px);} to {opacity:1; transform:none;} }

/* Inputs genéricos */
.input {
  width: 100%; padding: 0.55rem 0.75rem;
  border: 1px solid #cbd5e1; border-radius: 0.6rem;
  font-size: 0.9rem; transition: border 0.15s;
}
.input:focus { outline: none; border-color: #198754; box-shadow: 0 0 0 3px #19875420; }
.label { font-size: 0.8rem; font-weight: 600; color: #475569; margin-bottom: 0.25rem; display:block; }

/* Botones */
.btn { padding: 0.55rem 1rem; border-radius: 0.6rem; font-weight: 600; font-size: 0.9rem; transition: all 0.15s; cursor:pointer; }
.btn-primary { background: #0F5132; color:#fff; }
.btn-primary:hover { background: #146c43; }
.btn-danger  { background: #dc2626; color:#fff; }
.btn-danger:hover { background: #b91c1c; }
.btn-ghost   { background: #f1f5f9; color:#334155; }
.btn-ghost:hover { background: #e2e8f0; }

/* ============ Botones de acción rápida (Dashboard) ============ */
.action-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 1rem 0.5rem;
  border-radius: 0.9rem;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  cursor: pointer;
  text-align: center;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
.action-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.15);
}
.action-btn:active {
  transform: translateY(0);
}
.nav-btn {
  display: flex;
  align-items: center;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  color: #bfdbd9; /* Color teal claro */
  transition: all 0.2s;
}
.nav-btn:hover {
  background-color: #00565d; /* Teal oscuro */
  color: #fff;
}
.nav-btn.active {
  background-color: #00848e; /* Teal brillante */
  color: #fff;
  font-weight: 700;
}
.nav-btn svg {
  margin-right: 10px;
}